home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: UQWK.TAR
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| POSIX tar archive (GNU)
| default
| |
99%
| file
| POSIX tar archive (GNU), file Makefile, mode 644 , uid 150 , gid 144 , size 1175 , seconds 5350007632, user mloewen, group vm
| default
| |
98%
| file
| data
| default
| |
62%
| TrID
| TAR - Tape ARchive (GNU)
| default
| |
37%
| TrID
| TAR - Tape ARchive (file)
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| GNU tar archive
| default
| |
100%
| detectItEasy
| Archive: tar
| default
| |
100%
| binwalkID
| POSIX tar archive (GNU)
| default
| |
100%
| xdgMime
| application/x-tar
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4d 61 6b 65 66 69 6c 65 | 00 00 00 00 00 00 00 00 |Makefile|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00000070| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00000080| 20 20 20 31 31 37 35 20 | 20 35 33 35 30 30 30 37 | 1175 | 5350007|
|00000090| 36 33 32 20 20 31 30 37 | 36 31 00 20 30 00 00 00 |632 107|61. 0...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 23 0a 23 20 20 4d 61 6b | 65 66 69 6c 65 20 66 6f |#.# Mak|efile fo|
|00000210| 72 20 75 71 77 6b 0a 23 | 0a 23 20 20 73 74 65 76 |r uqwk.#|.# stev|
|00000220| 65 20 62 65 6c 63 7a 79 | 6b 20 20 30 32 2f 39 33 |e belczy|k 02/93|
|00000230| 0a 23 0a 43 46 4c 41 47 | 53 3d 0a 23 0a 23 20 20 |.#.CFLAG|S=.#.# |
|00000240| 55 73 65 20 74 68 69 73 | 20 66 6f 72 20 53 47 49 |Use this| for SGI|
|00000250| 3a 0a 23 43 46 4c 41 47 | 53 3d 2d 63 63 6b 72 0a |:.#CFLAG|S=-cckr.|
|00000260| 0a 75 71 77 6b 3a 09 75 | 71 77 6b 2e 6f 20 6f 70 |.uqwk:.u|qwk.o op|
|00000270| 74 69 6f 6e 73 2e 6f 20 | 69 6e 69 74 2e 6f 20 6d |tions.o |init.o m|
|00000280| 61 69 6c 2e 6f 20 6d 69 | 73 63 2e 6f 20 63 6c 6f |ail.o mi|sc.o clo|
|00000290| 73 65 2e 6f 20 6e 65 77 | 73 2e 6f 20 72 65 70 6c |se.o new|s.o repl|
|000002a0| 79 2e 6f 20 6f 66 66 6c | 69 6e 65 2e 6f 0a 09 63 |y.o offl|ine.o..c|
|000002b0| 63 20 2d 6f 20 75 71 77 | 6b 20 75 71 77 6b 2e 6f |c -o uqw|k uqwk.o|
|000002c0| 20 6f 70 74 69 6f 6e 73 | 2e 6f 20 69 6e 69 74 2e | options|.o init.|
|000002d0| 6f 20 6d 61 69 6c 2e 6f | 20 6d 69 73 63 2e 6f 20 |o mail.o| misc.o |
|000002e0| 63 6c 6f 73 65 2e 6f 20 | 6e 65 77 73 2e 6f 20 72 |close.o |news.o r|
|000002f0| 65 70 6c 79 2e 6f 20 6f | 66 66 6c 69 6e 65 2e 6f |eply.o o|ffline.o|
|00000300| 0a 0a 75 71 77 6b 2e 6f | 3a 09 75 71 77 6b 2e 63 |..uqwk.o|:.uqwk.c|
|00000310| 20 75 71 77 6b 2e 68 0a | 0a 6f 70 74 69 6f 6e 73 | uqwk.h.|.options|
|00000320| 2e 6f 3a 09 6f 70 74 69 | 6f 6e 73 2e 63 20 75 71 |.o:.opti|ons.c uq|
|00000330| 77 6b 2e 68 0a 0a 69 6e | 69 74 2e 6f 3a 09 69 6e |wk.h..in|it.o:.in|
|00000340| 69 74 2e 63 20 75 71 77 | 6b 2e 68 0a 0a 6d 61 69 |it.c uqw|k.h..mai|
|00000350| 6c 2e 6f 3a 09 6d 61 69 | 6c 2e 63 20 75 71 77 6b |l.o:.mai|l.c uqwk|
|00000360| 2e 68 0a 0a 6d 69 73 63 | 2e 6f 3a 09 6d 69 73 63 |.h..misc|.o:.misc|
|00000370| 2e 63 20 75 71 77 6b 2e | 68 0a 0a 63 6c 6f 73 65 |.c uqwk.|h..close|
|00000380| 2e 6f 3a 09 63 6c 6f 73 | 65 2e 63 20 75 71 77 6b |.o:.clos|e.c uqwk|
|00000390| 2e 68 0a 0a 6e 65 77 73 | 2e 6f 3a 09 6e 65 77 73 |.h..news|.o:.news|
|000003a0| 2e 63 20 75 71 77 6b 2e | 68 0a 0a 72 65 70 6c 79 |.c uqwk.|h..reply|
|000003b0| 2e 6f 3a 09 72 65 70 6c | 79 2e 63 20 75 71 77 6b |.o:.repl|y.c uqwk|
|000003c0| 2e 68 0a 0a 6f 66 66 6c | 69 6e 65 2e 6f 3a 09 6f |.h..offl|ine.o:.o|
|000003d0| 66 66 6c 69 6e 65 2e 63 | 20 75 71 77 6b 2e 68 0a |ffline.c| uqwk.h.|
|000003e0| 0a 63 6c 65 61 6e 3a 0a | 09 72 6d 20 2d 66 20 2a |.clean:.|.rm -f *|
|000003f0| 2e 6f 20 75 71 77 6b 0a | 0a 74 61 72 3a 0a 09 74 |.o uqwk.|.tar:..t|
|00000400| 61 72 20 63 76 66 20 75 | 71 77 6b 2e 74 61 72 20 |ar cvf u|qwk.tar |
|00000410| 2a 2e 5b 63 68 5d 20 4d | 61 6b 65 66 69 6c 65 20 |*.[ch] M|akefile |
|00000420| 52 45 41 44 4d 45 20 75 | 71 77 6b 2e 6d 61 6e 20 |README u|qwk.man |
|00000430| 75 71 77 6b 2e 63 61 74 | 0a 09 63 6f 6d 70 72 65 |uqwk.cat|..compre|
|00000440| 73 73 20 2d 76 20 75 71 | 77 6b 2e 74 61 72 0a 0a |ss -v uq|wk.tar..|
|00000450| 75 75 3a 0a 09 75 75 65 | 6e 63 6f 64 65 20 75 71 |uu:..uue|ncode uq|
|00000460| 77 6b 2e 74 61 72 2e 5a | 20 75 71 77 6b 2e 74 61 |wk.tar.Z| uqwk.ta|
|00000470| 72 2e 5a 20 3e 75 71 77 | 6b 2e 75 75 0a 00 00 00 |r.Z >uqw|k.uu....|
|00000480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 52 45 41 44 4d 45 00 00 | 00 00 00 00 00 00 00 00 |README..|........|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00000670| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00000680| 20 20 20 35 37 37 36 20 | 20 35 33 35 30 30 30 37 | 5776 | 5350007|
|00000690| 36 33 31 20 20 31 30 32 | 31 33 00 20 30 00 00 00 |631 102|13. 0...|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 55 51 57 4b 0a 0a 43 6f | 70 79 72 69 67 68 74 20 |UQWK..Co|pyright |
|00000810| 31 39 39 33 2c 20 73 74 | 65 76 65 20 62 65 6c 63 |1993, st|eve belc|
|00000820| 7a 79 6b 0a 0a 55 71 77 | 6b 20 69 73 20 61 20 70 |zyk..Uqw|k is a p|
|00000830| 72 6f 67 72 61 6d 20 77 | 68 69 63 68 20 63 6f 6c |rogram w|hich col|
|00000840| 6c 65 63 74 73 20 61 6c | 6c 20 61 20 75 73 65 72 |lects al|l a user|
|00000850| 27 73 20 75 6e 72 65 61 | 64 20 6d 61 69 6c 20 6f |'s unrea|d mail o|
|00000860| 72 20 6e 65 77 73 0a 61 | 6e 64 20 66 6f 72 6d 61 |r news.a|nd forma|
|00000870| 74 73 20 69 74 20 69 6e | 74 6f 20 73 6f 6d 65 74 |ts it in|to somet|
|00000880| 68 69 6e 67 20 63 61 6c | 6c 65 64 20 61 20 22 51 |hing cal|led a "Q|
|00000890| 57 4b 22 20 70 61 63 6b | 65 74 2c 20 77 68 69 63 |WK" pack|et, whic|
|000008a0| 68 20 69 73 20 74 68 65 | 6e 0a 64 6f 77 6e 6c 6f |h is the|n.downlo|
|000008b0| 61 64 65 64 2e 20 20 4d | 61 69 6c 20 61 6e 64 20 |aded. M|ail and |
|000008c0| 4e 65 77 73 20 63 61 6e | 20 74 68 65 6e 20 62 65 |News can| then be|
|000008d0| 20 72 65 61 64 20 6f 66 | 66 6c 69 6e 65 2c 20 73 | read of|fline, s|
|000008e0| 61 76 69 6e 67 20 70 68 | 6f 6e 65 0a 63 68 61 72 |aving ph|one.char|
|000008f0| 67 65 73 2e 20 20 51 57 | 4b 20 72 65 61 64 65 72 |ges. QW|K reader|
|00000900| 73 20 65 78 69 73 74 20 | 66 6f 72 20 61 6c 6d 6f |s exist |for almo|
|00000910| 73 74 20 65 76 65 72 79 | 20 6d 61 63 68 69 6e 65 |st every| machine|
|00000920| 2e 0a 0a 55 71 77 6b 20 | 61 6c 73 6f 20 61 63 63 |...Uqwk |also acc|
|00000930| 65 70 74 73 20 72 65 70 | 6c 79 20 70 61 63 6b 65 |epts rep|ly packe|
|00000940| 74 73 2c 20 73 6f 20 72 | 65 70 6c 69 65 73 20 63 |ts, so r|eplies c|
|00000950| 61 6e 20 62 65 20 6d 61 | 69 6c 65 64 20 28 69 66 |an be ma|iled (if|
|00000960| 20 79 6f 75 72 0a 6d 61 | 69 6c 65 72 20 75 6e 64 | your.ma|iler und|
|00000970| 65 72 73 74 61 6e 64 73 | 20 22 6d 61 69 6c 20 2d |erstands| "mail -|
|00000980| 73 22 29 2c 20 6f 72 20 | 70 6f 73 74 65 64 20 28 |s"), or |posted (|
|00000990| 69 66 20 79 6f 75 20 68 | 61 76 65 20 61 20 42 2d |if you h|ave a B-|
|000009a0| 6e 65 77 73 20 74 79 70 | 65 0a 6f 66 20 69 6e 65 |news typ|e.of ine|
|000009b0| 77 73 20 74 68 61 74 20 | 75 6e 64 65 72 73 74 61 |ws that |understa|
|000009c0| 6e 64 73 20 2d 6e 20 61 | 6e 64 20 2d 74 29 2c 20 |nds -n a|nd -t), |
|000009d0| 64 65 70 65 6e 64 69 6e | 67 20 77 68 65 74 68 65 |dependin|g whethe|
|000009e0| 72 20 74 68 65 20 6d 65 | 73 73 61 67 65 0a 69 73 |r the me|ssage.is|
|000009f0| 20 6d 61 72 6b 65 64 20 | 70 72 69 76 61 74 65 20 | marked |private |
|00000a00| 28 65 6d 61 69 6c 29 20 | 6f 72 20 70 75 62 6c 69 |(email) |or publi|
|00000a10| 63 20 28 6e 65 77 73 29 | 2e 0a 0a 55 71 77 6b 20 |c (news)|...Uqwk |
|00000a20| 61 6c 73 6f 20 73 75 70 | 70 6f 72 74 73 20 61 20 |also sup|ports a |
|00000a30| 73 6d 61 6c 6c 20 6f 66 | 66 6c 69 6e 65 20 63 6f |small of|fline co|
|00000a40| 6d 6d 61 6e 64 20 6c 61 | 6e 67 75 61 67 65 2c 20 |mmand la|nguage, |
|00000a50| 73 6f 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 73 0a |so the c|ontents.|
|00000a60| 6f 66 20 74 68 65 20 75 | 73 65 72 27 73 20 2e 6e |of the u|ser's .n|
|00000a70| 65 77 73 72 63 20 66 69 | 6c 65 20 63 61 6e 20 62 |ewsrc fi|le can b|
|00000a80| 65 20 76 69 65 77 65 64 | 20 61 6e 64 20 6d 61 6e |e viewed| and man|
|00000a90| 69 70 75 6c 61 74 65 64 | 20 6f 66 66 6c 69 6e 65 |ipulated| offline|
|00000aa0| 2e 0a 0a 49 4e 53 54 41 | 4c 4c 41 54 49 4f 4e 0a |...INSTA|LLATION.|
|00000ab0| 0a 31 2e 20 20 43 72 65 | 61 74 65 20 61 20 64 69 |.1. Cre|ate a di|
|00000ac0| 72 65 63 74 6f 72 79 20 | 66 6f 72 20 74 68 65 20 |rectory |for the |
|00000ad0| 75 71 77 6b 20 73 6f 75 | 72 63 65 20 63 6f 64 65 |uqwk sou|rce code|
|00000ae0| 2e 0a 0a 09 6d 6b 64 69 | 72 20 2f 75 73 72 2f 6c |....mkdi|r /usr/l|
|00000af0| 6f 63 61 6c 2f 73 72 63 | 2f 75 71 77 6b 0a 0a 32 |ocal/src|/uqwk..2|
|00000b00| 2e 20 20 4d 6f 76 65 20 | 74 68 65 20 75 71 77 6b |. Move |the uqwk|
|00000b10| 20 74 61 72 20 66 69 6c | 65 20 74 6f 20 74 68 61 | tar fil|e to tha|
|00000b20| 74 20 64 69 72 65 63 74 | 6f 72 79 2e 0a 0a 09 6d |t direct|ory....m|
|00000b30| 76 20 75 71 77 6b 2e 74 | 61 72 2e 5a 20 2f 75 73 |v uqwk.t|ar.Z /us|
|00000b40| 72 2f 6c 6f 63 61 6c 2f | 73 72 63 2f 75 71 77 6b |r/local/|src/uqwk|
|00000b50| 0a 0a 33 2e 20 20 43 68 | 61 6e 67 65 20 74 6f 20 |..3. Ch|ange to |
|00000b60| 74 68 61 74 20 64 69 72 | 65 63 74 6f 72 79 2c 20 |that dir|ectory, |
|00000b70| 61 6e 64 20 75 6e 70 61 | 63 6b 20 74 68 65 20 74 |and unpa|ck the t|
|00000b80| 61 72 20 66 69 6c 65 2e | 0a 0a 09 63 64 20 2f 75 |ar file.|...cd /u|
|00000b90| 73 72 2f 6c 6f 63 61 6c | 2f 73 72 63 2f 75 71 77 |sr/local|/src/uqw|
|00000ba0| 6b 3b 20 7a 63 61 74 20 | 75 71 77 6b 2e 74 61 72 |k; zcat |uqwk.tar|
|00000bb0| 20 7c 20 74 61 72 20 78 | 76 66 20 2d 0a 0a 34 2e | | tar x|vf -..4.|
|00000bc0| 20 20 43 6f 6d 70 69 6c | 65 20 74 68 65 20 73 6f | Compil|e the so|
|00000bd0| 66 74 77 61 72 65 2e 0a | 0a 09 6d 61 6b 65 0a 0a |ftware..|..make..|
|00000be0| 20 20 20 20 49 66 20 74 | 68 69 73 20 64 6f 65 73 | If t|his does|
|00000bf0| 6e 27 74 20 77 6f 72 6b | 20 79 6f 75 20 6d 61 79 |n't work| you may|
|00000c00| 20 68 61 76 65 20 74 6f | 20 74 77 69 64 64 6c 65 | have to| twiddle|
|00000c10| 20 77 69 74 68 20 74 68 | 65 20 4d 61 6b 65 66 69 | with th|e Makefi|
|00000c20| 6c 65 2c 0a 20 20 20 20 | 6f 72 2c 20 68 65 61 76 |le,. |or, heav|
|00000c30| 65 6e 20 66 6f 72 62 69 | 64 2c 20 74 68 65 20 61 |en forbi|d, the a|
|00000c40| 63 74 75 61 6c 20 73 6f | 75 72 63 65 20 63 6f 64 |ctual so|urce cod|
|00000c50| 65 2e 0a 0a 35 2e 20 20 | 4d 6f 76 65 20 74 68 65 |e...5. |Move the|
|00000c60| 20 62 69 6e 61 72 79 20 | 61 6e 64 20 6d 61 6e 20 | binary |and man |
|00000c70| 70 61 67 65 73 20 74 6f | 20 73 6f 6d 65 20 70 75 |pages to| some pu|
|00000c80| 62 6c 69 63 20 70 6c 61 | 63 65 2e 0a 0a 09 6d 76 |blic pla|ce....mv|
|00000c90| 20 75 71 77 6b 20 2f 75 | 73 72 2f 6c 6f 63 61 6c | uqwk /u|sr/local|
|00000ca0| 2f 62 69 6e 0a 09 6d 76 | 20 75 71 77 6b 2e 6d 61 |/bin..mv| uqwk.ma|
|00000cb0| 6e 20 2f 75 73 72 2f 6d | 61 6e 2f 6d 61 6e 31 2f |n /usr/m|an/man1/|
|00000cc0| 75 71 77 6b 2e 31 0a 09 | 6d 76 20 75 71 77 6b 2e |uqwk.1..|mv uqwk.|
|00000cd0| 63 61 74 20 2f 75 73 72 | 2f 6d 61 6e 2f 63 61 74 |cat /usr|/man/cat|
|00000ce0| 31 2f 75 71 77 6b 2e 31 | 0a 0a 36 2e 20 20 54 68 |1/uqwk.1|..6. Th|
|00000cf0| 65 20 51 57 4b 20 73 70 | 65 63 69 66 69 63 61 74 |e QWK sp|ecificat|
|00000d00| 69 6f 6e 20 61 6c 6c 6f | 77 73 20 66 6f 72 20 74 |ion allo|ws for t|
|00000d10| 68 65 20 6e 61 6d 65 2c | 20 6c 6f 63 61 74 69 6f |he name,| locatio|
|00000d20| 6e 2c 20 65 74 63 2e 2c | 20 6f 66 0a 20 20 20 20 |n, etc.,| of. |
|00000d30| 74 68 65 20 42 42 53 20 | 66 72 6f 6d 20 77 68 69 |the BBS |from whi|
|00000d40| 63 68 20 6d 65 73 73 61 | 67 65 73 20 61 72 65 20 |ch messa|ges are |
|00000d50| 62 65 69 6e 67 20 64 6f | 77 6e 6c 6f 61 64 65 64 |being do|wnloaded|
|00000d60| 2e 20 20 59 6f 75 20 73 | 68 6f 75 6c 64 0a 20 20 |. You s|hould. |
|00000d70| 20 20 63 6f 6e 66 69 67 | 75 72 65 20 74 68 69 73 | config|ure this|
|00000d80| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 20 20 54 | informa|tion. T|
|00000d90| 68 65 20 62 65 73 74 20 | 77 61 79 20 69 73 20 70 |he best |way is p|
|00000da0| 72 6f 62 61 62 6c 79 20 | 74 6f 20 75 73 65 0a 20 |robably |to use. |
|00000db0| 20 20 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 | envir|onment v|
|00000dc0| 61 72 69 61 62 6c 65 73 | 2e 20 20 49 66 20 79 6f |ariables|. If yo|
|00000dd0| 75 20 61 72 65 20 75 73 | 69 6e 67 20 61 20 42 6f |u are us|ing a Bo|
|00000de0| 75 72 6e 65 20 73 68 65 | 6c 6c 2c 20 79 6f 75 0a |urne she|ll, you.|
|00000df0| 20 20 20 20 73 68 6f 75 | 6c 64 20 61 64 64 20 73 | shou|ld add s|
|00000e00| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 20 74 68 |omething| like th|
|00000e10| 69 73 20 74 6f 20 2f 65 | 74 63 2f 70 72 6f 66 69 |is to /e|tc/profi|
|00000e20| 6c 65 20 6f 72 20 2e 70 | 72 6f 66 69 6c 65 3a 0a |le or .p|rofile:.|
|00000e30| 0a 20 20 20 20 20 20 20 | 20 55 51 5f 42 42 53 5f |. | UQ_BBS_|
|00000e40| 4e 41 4d 45 3d 22 4d 79 | 20 53 75 70 65 72 20 42 |NAME="My| Super B|
|00000e50| 42 53 22 0a 09 55 51 5f | 42 42 53 5f 43 49 54 59 |BS"..UQ_|BBS_CITY|
|00000e60| 3d 22 53 6f 6d 65 77 68 | 65 72 65 2c 20 50 41 22 |="Somewh|ere, PA"|
|00000e70| 0a 09 55 51 5f 42 42 53 | 5f 50 48 4f 4e 45 3d 22 |..UQ_BBS|_PHONE="|
|00000e80| 2b 31 20 32 31 35 20 35 | 35 35 20 31 32 31 32 22 |+1 215 5|55 1212"|
|00000e90| 0a 09 55 51 5f 42 42 53 | 5f 53 59 53 4f 50 3d 22 |..UQ_BBS|_SYSOP="|
|00000ea0| 4a 6f 65 20 53 68 6d 6f | 65 22 0a 09 55 51 5f 42 |Joe Shmo|e"..UQ_B|
|00000eb0| 42 53 5f 49 44 3d 22 30 | 2c 4d 59 42 42 53 22 0a |BS_ID="0|,MYBBS".|
|00000ec0| 09 65 78 70 6f 72 74 20 | 55 51 5f 42 42 53 5f 4e |.export |UQ_BBS_N|
|00000ed0| 41 4d 45 20 55 51 5f 42 | 42 53 5f 43 49 54 59 20 |AME UQ_B|BS_CITY |
|00000ee0| 55 51 5f 42 42 53 5f 50 | 48 4f 4e 45 0a 09 65 78 |UQ_BBS_P|HONE..ex|
|00000ef0| 70 6f 72 74 20 55 51 5f | 42 42 53 5f 53 59 53 4f |port UQ_|BBS_SYSO|
|00000f00| 50 20 55 51 5f 42 42 53 | 5f 49 44 0a 0a 20 20 20 |P UQ_BBS|_ID.. |
|00000f10| 20 49 66 20 79 6f 75 20 | 75 73 65 20 61 20 43 20 | If you |use a C |
|00000f20| 74 79 70 65 20 73 68 65 | 6c 6c 2c 20 74 72 79 20 |type she|ll, try |
|00000f30| 73 6f 6d 65 74 68 69 6e | 67 20 6c 69 6b 65 20 74 |somethin|g like t|
|00000f40| 68 69 73 20 69 6e 20 79 | 6f 75 72 0a 20 20 20 20 |his in y|our. |
|00000f50| 2e 63 73 68 72 63 20 6f | 72 20 2e 6c 6f 67 69 6e |.cshrc o|r .login|
|00000f60| 3a 0a 0a 20 20 20 20 20 | 20 20 20 73 65 74 65 6e |:.. | seten|
|00000f70| 76 20 55 51 5f 42 42 53 | 5f 4e 41 4d 45 20 22 4d |v UQ_BBS|_NAME "M|
|00000f80| 79 20 53 75 70 65 72 20 | 42 42 53 22 0a 09 73 65 |y Super |BBS"..se|
|00000f90| 74 65 6e 76 20 55 51 5f | 42 42 53 5f 43 49 54 59 |tenv UQ_|BBS_CITY|
|00000fa0| 20 22 53 6f 6d 65 77 68 | 65 72 65 2c 20 50 41 22 | "Somewh|ere, PA"|
|00000fb0| 0a 09 73 65 74 65 6e 76 | 20 55 51 5f 42 42 53 5f |..setenv| UQ_BBS_|
|00000fc0| 50 48 4f 4e 45 20 22 2b | 31 20 32 31 35 20 35 35 |PHONE "+|1 215 55|
|00000fd0| 35 20 31 32 31 32 22 0a | 09 73 65 74 65 6e 76 20 |5 1212".|.setenv |
|00000fe0| 55 51 5f 42 42 53 5f 53 | 59 53 4f 50 20 22 4a 6f |UQ_BBS_S|YSOP "Jo|
|00000ff0| 65 20 53 68 6d 6f 65 22 | 0a 09 73 65 74 65 6e 76 |e Shmoe"|..setenv|
|00001000| 20 55 51 5f 42 42 53 5f | 49 44 20 22 30 2c 4d 59 | UQ_BBS_|ID "0,MY|
|00001010| 42 42 53 22 0a 0a 20 20 | 20 20 49 6e 20 62 6f 74 |BBS".. | In bot|
|00001020| 68 20 63 61 73 65 73 2c | 20 74 68 65 20 6c 61 73 |h cases,| the las|
|00001030| 74 20 65 6e 74 72 79 2c | 20 74 68 65 20 22 42 42 |t entry,| the "BB|
|00001040| 53 20 49 44 22 2c 20 69 | 73 20 74 68 65 20 6d 6f |S ID", i|s the mo|
|00001050| 73 74 20 69 6d 70 6f 72 | 74 61 6e 74 2e 0a 20 20 |st impor|tant.. |
|00001060| 20 20 49 74 20 61 6c 77 | 61 79 73 20 63 6f 6e 73 | It alw|ays cons|
|00001070| 69 73 74 73 20 6f 66 20 | 61 6e 20 69 6e 74 65 67 |ists of |an integ|
|00001080| 65 72 2c 20 61 20 63 6f | 6d 6d 61 2c 20 61 6e 64 |er, a co|mma, and|
|00001090| 20 61 20 73 74 72 69 6e | 67 20 6c 65 73 73 20 74 | a strin|g less t|
|000010a0| 68 61 6e 0a 20 20 20 20 | 6e 69 6e 65 20 63 68 61 |han. |nine cha|
|000010b0| 72 61 63 74 65 72 73 2c | 20 77 69 74 68 20 6e 6f |racters,| with no|
|000010c0| 20 69 6e 74 65 72 76 65 | 6e 69 6e 67 20 73 70 61 | interve|ning spa|
|000010d0| 63 65 73 2e 20 20 54 68 | 65 20 73 74 72 69 6e 67 |ces. Th|e string|
|000010e0| 20 77 69 6c 6c 20 62 65 | 0a 20 20 20 20 75 73 65 | will be|. use|
|000010f0| 64 20 74 6f 20 69 64 65 | 6e 74 69 66 79 20 72 65 |d to ide|ntify re|
|00001100| 70 6c 79 20 70 61 63 6b | 65 74 73 2e 0a 0a 37 2e |ply pack|ets...7.|
|00001110| 20 20 4e 6f 77 20 79 6f | 75 20 63 61 6e 20 74 72 | Now yo|u can tr|
|00001120| 79 20 69 74 2e 20 20 4c | 6f 67 20 69 6e 20 61 73 |y it. L|og in as|
|00001130| 20 61 20 6e 6f 72 6d 61 | 6c 20 75 73 65 72 20 77 | a norma|l user w|
|00001140| 68 6f 20 68 61 73 20 73 | 6f 6d 65 20 6d 61 69 6c |ho has s|ome mail|
|00001150| 2c 0a 20 20 20 20 61 6e | 64 20 69 73 73 75 65 3a |,. an|d issue:|
|00001160| 0a 0a 09 75 71 77 6b 20 | 2b 72 0a 0a 20 20 20 20 |...uqwk |+r.. |
|00001170| 28 54 68 65 20 22 2b 72 | 22 20 73 74 6f 70 73 20 |(The "+r|" stops |
|00001180| 75 71 77 6b 20 66 72 6f | 6d 20 63 6c 65 61 72 69 |uqwk fro|m cleari|
|00001190| 6e 67 20 74 68 65 20 75 | 73 65 72 27 73 20 6d 61 |ng the u|ser's ma|
|000011a0| 69 6c 20 73 70 6f 6f 6c | 20 66 69 6c 65 2e 29 0a |il spool| file.).|
|000011b0| 20 20 20 20 54 68 69 73 | 20 73 68 6f 75 6c 64 20 | This| should |
|000011c0| 63 72 65 61 74 65 20 74 | 68 72 65 65 20 6e 65 77 |create t|hree new|
|000011d0| 20 66 69 6c 65 73 20 69 | 6e 20 74 68 65 20 63 75 | files i|n the cu|
|000011e0| 72 72 65 6e 74 20 64 69 | 72 65 63 74 6f 72 79 20 |rrent di|rectory |
|000011f0| 6e 61 6d 65 64 0a 20 20 | 20 20 6d 65 73 73 61 67 |named. | messag|
|00001200| 65 73 2e 64 61 74 2c 20 | 63 6f 6e 74 72 6f 6c 2e |es.dat, |control.|
|00001210| 64 61 74 2c 20 61 6e 64 | 20 70 65 72 73 6f 6e 61 |dat, and| persona|
|00001220| 6c 2e 6e 64 78 2e 20 20 | 54 68 65 73 65 20 61 72 |l.ndx. |These ar|
|00001230| 65 20 74 68 65 20 66 69 | 6c 65 73 0a 20 20 20 20 |e the fi|les. |
|00001240| 77 68 69 63 68 20 74 68 | 65 20 6f 66 66 6c 69 6e |which th|e offlin|
|00001250| 65 20 72 65 61 64 65 72 | 20 77 69 6c 6c 20 6e 65 |e reader| will ne|
|00001260| 65 64 2e 20 20 28 4e 6f | 74 20 61 6c 6c 20 72 65 |ed. (No|t all re|
|00001270| 61 64 65 72 73 20 6e 65 | 65 64 20 74 68 65 0a 20 |aders ne|ed the. |
|00001280| 20 20 20 2a 2e 6e 64 78 | 20 66 69 6c 65 73 2e 20 | *.ndx| files. |
|00001290| 20 41 6c 73 6f 2c 20 73 | 6f 6d 65 20 72 65 61 64 | Also, s|ome read|
|000012a0| 65 72 73 20 65 78 70 65 | 63 74 20 74 68 65 73 65 |ers expe|ct these|
|000012b0| 20 66 69 6c 65 73 20 74 | 6f 20 68 61 76 65 20 62 | files t|o have b|
|000012c0| 65 65 6e 0a 20 20 20 20 | 61 72 63 68 69 76 65 64 |een. |archived|
|000012d0| 20 75 73 69 6e 67 20 61 | 6e 20 61 72 63 68 69 76 | using a|n archiv|
|000012e0| 65 72 20 6c 69 6b 65 20 | 7a 69 70 2c 20 6c 68 61 |er like |zip, lha|
|000012f0| 72 63 2c 20 6f 72 20 61 | 72 6a 2e 20 20 59 6f 75 |rc, or a|rj. You|
|00001300| 20 6d 61 79 20 6e 65 65 | 64 0a 20 20 20 20 74 6f | may nee|d. to|
|00001310| 20 6f 62 74 61 69 6e 20 | 55 6e 69 78 20 76 65 72 | obtain |Unix ver|
|00001320| 73 69 6f 6e 73 20 6f 66 | 20 74 68 65 73 65 20 61 |sions of| these a|
|00001330| 72 63 68 69 76 65 72 73 | 2e 29 0a 0a 38 2e 20 20 |rchivers|.)..8. |
|00001340| 4e 6f 77 20 69 74 20 77 | 6f 75 6c 64 20 62 65 20 |Now it w|ould be |
|00001350| 61 20 67 6f 6f 64 20 69 | 64 65 61 20 74 6f 20 72 |a good i|dea to r|
|00001360| 65 61 64 20 74 68 65 20 | 6d 61 6e 20 70 61 67 65 |ead the |man page|
|00001370| 2e 0a 0a 50 6c 65 61 73 | 65 20 69 6e 66 6f 72 6d |...Pleas|e inform|
|00001380| 20 6d 65 20 6f 66 20 61 | 6e 79 20 70 72 6f 62 6c | me of a|ny probl|
|00001390| 65 6d 73 20 79 6f 75 20 | 72 75 6e 20 69 6e 74 6f |ems you |run into|
|000013a0| 3a 0a 0a 20 20 20 20 73 | 74 65 76 65 20 62 65 6c |:.. s|teve bel|
|000013b0| 63 7a 79 6b 0a 20 20 20 | 20 73 74 65 76 65 31 40 |czyk. | steve1@|
|000013c0| 67 65 6e 65 73 69 73 2e | 6e 72 65 64 2e 6d 61 2e |genesis.|nred.ma.|
|000013d0| 75 73 0a 20 20 20 20 73 | 65 62 33 40 67 74 65 2e |us. s|eb3@gte.|
|000013e0| 63 6f 6d 0a 20 20 20 20 | 42 42 53 3a 20 2b 31 20 |com. |BBS: +1 |
|000013f0| 35 30 38 20 36 36 34 20 | 30 31 34 39 0a 0a 00 00 |508 664 |0149....|
|00001400| 63 6c 6f 73 65 2e 63 00 | 00 00 00 00 00 00 00 00 |close.c.|........|
|00001410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00001470| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00001480| 20 20 20 34 30 32 36 20 | 20 35 33 35 30 30 30 37 | 4026 | 5350007|
|00001490| 36 33 32 20 20 31 30 35 | 37 30 00 20 30 00 00 00 |632 105|70. 0...|
|000014a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001500| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00001510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001520| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00001530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001600| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00001610| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 72 |h>.#incl|ude <str|
|00001620| 69 6e 67 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |ing.h>.#|include |
|00001630| 3c 74 69 6d 65 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |<time.h>|.#includ|
|00001640| 65 20 22 75 71 77 6b 2e | 68 22 0a 0a 2f 2a 0a 20 |e "uqwk.|h"../*. |
|00001650| 2a 20 20 57 72 61 70 20 | 74 68 69 6e 67 73 20 75 |* Wrap |things u|
|00001660| 70 0a 20 2a 2f 0a 0a 43 | 6c 6f 73 65 53 74 75 66 |p. */..C|loseStuf|
|00001670| 66 28 29 0a 7b 0a 09 66 | 63 6c 6f 73 65 20 28 6d |f().{..f|close (m|
|00001680| 73 67 5f 66 64 29 3b 0a | 0a 09 57 72 69 74 65 43 |sg_fd);.|..WriteC|
|00001690| 6f 6e 74 72 6f 6c 28 29 | 3b 0a 09 69 66 20 28 64 |ontrol()|;..if (d|
|000016a0| 6f 5f 6e 65 77 73 20 26 | 26 20 28 21 72 65 61 64 |o_news &|& (!read|
|000016b0| 5f 6f 6e 6c 79 29 20 29 | 20 57 72 69 74 65 4e 65 |_only) )| WriteNe|
|000016c0| 77 73 72 63 28 29 3b 0a | 0a 09 69 66 20 28 62 6c |wsrc();.|..if (bl|
|000016d0| 6b 5f 63 6e 74 20 3e 3d | 20 6d 61 78 5f 62 6c 6b |k_cnt >=| max_blk|
|000016e0| 73 29 0a 09 7b 0a 09 09 | 66 70 72 69 6e 74 66 20 |s)..{...|fprintf |
|000016f0| 28 73 74 64 65 72 72 2c | 0a 09 09 09 22 25 73 3a |(stderr,|...."%s:|
|00001700| 20 62 6c 6f 63 6b 20 63 | 6f 75 6e 74 20 65 78 63 | block c|ount exc|
|00001710| 65 65 64 65 64 3b 20 73 | 6f 6d 65 20 61 72 74 69 |eeded; s|ome arti|
|00001720| 63 6c 65 73 20 6e 6f 74 | 20 70 61 63 6b 65 64 5c |cles not| packed\|
|00001730| 6e 22 2c 0a 09 09 09 70 | 72 6f 67 6e 61 6d 65 29 |n",....p|rogname)|
|00001740| 3b 0a 09 7d 0a 0a 09 2f | 2a 20 52 65 6d 6f 76 65 |;..}.../|* Remove|
|00001750| 20 72 65 70 6c 79 20 70 | 61 63 6b 65 74 20 2a 2f | reply p|acket */|
|00001760| 0a 09 69 66 20 28 20 28 | 21 72 65 61 64 5f 6f 6e |..if ( (|!read_on|
|00001770| 6c 79 29 20 26 26 20 28 | 73 74 72 63 6d 70 20 28 |ly) && (|strcmp (|
|00001780| 72 65 70 5f 66 69 6c 65 | 2c 20 44 45 46 5f 52 45 |rep_file|, DEF_RE|
|00001790| 50 5f 46 49 4c 45 29 29 | 29 0a 09 7b 0a 09 09 75 |P_FILE))|)..{...u|
|000017a0| 6e 6c 69 6e 6b 20 28 72 | 65 70 5f 66 69 6c 65 29 |nlink (r|ep_file)|
|000017b0| 3b 0a 09 7d 0a 7d 0a 0a | 57 72 69 74 65 43 6f 6e |;..}.}..|WriteCon|
|000017c0| 74 72 6f 6c 28 29 0a 2f | 2a 0a 20 2a 20 20 43 72 |trol()./|*. * Cr|
|000017d0| 65 61 74 65 20 74 68 65 | 20 43 4f 4e 54 52 4f 4c |eate the| CONTROL|
|000017e0| 2e 44 41 54 20 66 69 6c | 65 0a 20 2a 2f 0a 7b 0a |.DAT fil|e. */.{.|
|000017f0| 09 73 74 72 75 63 74 20 | 63 6f 6e 66 5f 65 6e 74 |.struct |conf_ent|
|00001800| 20 2a 63 70 3b 0a 09 73 | 74 72 75 63 74 20 74 6d | *cp;..s|truct tm|
|00001810| 20 2a 74 3b 0a 09 63 68 | 61 72 20 63 74 6c 5f 66 | *t;..ch|ar ctl_f|
|00001820| 6e 61 6d 65 5b 50 41 54 | 48 5f 4c 45 4e 5d 3b 0a |name[PAT|H_LEN];.|
|00001830| 09 69 6e 74 20 63 6c 6f | 63 6b 3b 0a 0a 09 73 74 |.int clo|ck;...st|
|00001840| 72 63 70 79 20 28 63 74 | 6c 5f 66 6e 61 6d 65 2c |rcpy (ct|l_fname,|
|00001850| 20 68 6f 6d 65 5f 64 69 | 72 29 3b 0a 09 73 74 72 | home_di|r);..str|
|00001860| 63 70 79 20 28 63 74 6c | 5f 66 6e 61 6d 65 2c 20 |cpy (ctl|_fname, |
|00001870| 22 2f 22 29 3b 0a 09 73 | 74 72 63 70 79 20 28 63 |"/");..s|trcpy (c|
|00001880| 74 6c 5f 66 6e 61 6d 65 | 2c 20 22 63 6f 6e 74 72 |tl_fname|, "contr|
|00001890| 6f 6c 2e 64 61 74 22 29 | 3b 0a 0a 09 69 66 20 28 |ol.dat")|;...if (|
|000018a0| 4e 55 4c 4c 20 3d 3d 20 | 28 63 74 6c 5f 66 64 20 |NULL == |(ctl_fd |
|000018b0| 3d 20 66 6f 70 65 6e 20 | 28 63 74 6c 5f 66 6e 61 |= fopen |(ctl_fna|
|000018c0| 6d 65 2c 20 22 77 22 29 | 29 29 0a 09 7b 0a 09 09 |me, "w")|))..{...|
|000018d0| 66 70 72 69 6e 74 66 20 | 28 73 74 64 65 72 72 2c |fprintf |(stderr,|
|000018e0| 20 22 25 73 3a 20 63 61 | 6e 27 74 20 6f 70 65 6e | "%s: ca|n't open|
|000018f0| 20 25 73 5c 6e 22 2c 20 | 70 72 6f 67 6e 61 6d 65 | %s\n", |progname|
|00001900| 2c 20 63 74 6c 5f 66 6e | 61 6d 65 29 3b 0a 09 09 |, ctl_fn|ame);...|
|00001910| 65 78 69 74 20 28 30 29 | 3b 0a 09 7d 0a 0a 09 66 |exit (0)|;..}...f|
|00001920| 70 72 69 6e 74 66 20 28 | 63 74 6c 5f 66 64 2c 20 |printf (|ctl_fd, |
|00001930| 22 25 73 5c 72 5c 6e 25 | 73 5c 72 5c 6e 25 73 5c |"%s\r\n%|s\r\n%s\|
|00001940| 72 5c 6e 25 73 5c 72 5c | 6e 25 73 5c 72 5c 6e 22 |r\n%s\r\|n%s\r\n"|
|00001950| 2c 0a 09 09 62 62 73 5f | 6e 61 6d 65 2c 20 62 62 |,...bbs_|name, bb|
|00001960| 73 5f 63 69 74 79 2c 20 | 62 62 73 5f 70 68 6f 6e |s_city, |bbs_phon|
|00001970| 65 2c 20 62 62 73 5f 73 | 79 73 6f 70 2c 20 62 62 |e, bbs_s|ysop, bb|
|00001980| 73 5f 69 64 29 3b 0a 0a | 09 2f 2a 20 44 61 74 65 |s_id);..|./* Date|
|00001990| 20 2a 2f 0a 09 63 6c 6f | 63 6b 20 3d 20 74 69 6d | */..clo|ck = tim|
|000019a0| 65 20 28 4e 55 4c 4c 29 | 3b 0a 09 74 20 3d 20 67 |e (NULL)|;..t = g|
|000019b0| 6d 74 69 6d 65 20 28 26 | 63 6c 6f 63 6b 29 3b 0a |mtime (&|clock);.|
|000019c0| 09 66 70 72 69 6e 74 66 | 20 28 63 74 6c 5f 66 64 |.fprintf| (ctl_fd|
|000019d0| 2c 20 22 25 30 32 64 5c | 2d 25 30 32 64 5c 2d 25 |, "%02d\|-%02d\-%|
|000019e0| 30 34 64 2c 25 30 32 64 | 5c 3a 25 30 32 64 5c 3a |04d,%02d|\:%02d\:|
|000019f0| 25 30 32 64 5c 72 5c 6e | 22 2c 0a 09 09 74 2d 3e |%02d\r\n|",...t->|
|00001a00| 74 6d 5f 6d 6f 6e 2b 31 | 2c 20 74 2d 3e 74 6d 5f |tm_mon+1|, t->tm_|
|00001a10| 6d 64 61 79 2c 20 74 2d | 3e 74 6d 5f 79 65 61 72 |mday, t-|>tm_year|
|00001a20| 2b 31 39 30 30 2c 0a 09 | 09 74 2d 3e 74 6d 5f 68 |+1900,..|.t->tm_h|
|00001a30| 6f 75 72 2c 20 74 2d 3e | 74 6d 5f 6d 69 6e 2c 20 |our, t->|tm_min, |
|00001a40| 74 2d 3e 74 6d 5f 73 65 | 63 29 3b 0a 0a 09 66 70 |t->tm_se|c);...fp|
|00001a50| 72 69 6e 74 66 20 28 63 | 74 6c 5f 66 64 2c 20 22 |rintf (c|tl_fd, "|
|00001a60| 25 73 5c 72 5c 6e 20 5c | 72 5c 6e 30 5c 72 5c 6e |%s\r\n \|r\n0\r\n|
|00001a70| 22 2c 20 75 73 65 72 5f | 6e 61 6d 65 29 3b 0a 09 |", user_|name);..|
|00001a80| 66 70 72 69 6e 74 66 20 | 28 63 74 6c 5f 66 64 2c |fprintf |(ctl_fd,|
|00001a90| 20 22 25 64 5c 72 5c 6e | 25 64 5c 72 5c 6e 22 2c | "%d\r\n|%d\r\n",|
|00001aa0| 20 6d 73 67 5f 63 6e 74 | 2c 20 63 6f 6e 66 5f 63 | msg_cnt|, conf_c|
|00001ab0| 6e 74 2d 31 29 3b 0a 0a | 09 2f 2a 20 4c 69 73 74 |nt-1);..|./* List|
|00001ac0| 20 6f 66 20 63 6f 6e 66 | 65 72 65 6e 63 65 73 20 | of conf|erences |
|00001ad0| 2a 2f 0a 09 63 70 20 3d | 20 63 6f 6e 66 5f 6c 69 |*/..cp =| conf_li|
|00001ae0| 73 74 3b 0a 09 77 68 69 | 6c 65 20 28 63 70 20 21 |st;..whi|le (cp !|
|00001af0| 3d 20 4e 55 4c 4c 29 0a | 09 7b 0a 09 09 66 70 72 |= NULL).|.{...fpr|
|00001b00| 69 6e 74 66 20 28 63 74 | 6c 5f 66 64 2c 20 22 25 |intf (ct|l_fd, "%|
|00001b10| 64 5c 72 5c 6e 25 73 5c | 72 5c 6e 22 2c 20 63 70 |d\r\n%s\|r\n", cp|
|00001b20| 2d 3e 6e 75 6d 62 65 72 | 2c 20 63 70 2d 3e 6e 61 |->number|, cp->na|
|00001b30| 6d 65 29 3b 0a 09 09 63 | 70 20 3d 20 63 70 2d 3e |me);...c|p = cp->|
|00001b40| 6e 65 78 74 3b 0a 09 7d | 0a 0a 09 66 70 72 69 6e |next;..}|...fprin|
|00001b50| 74 66 20 28 63 74 6c 5f | 66 64 2c 20 22 57 45 4c |tf (ctl_|fd, "WEL|
|00001b60| 43 4f 4d 45 2e 44 41 54 | 5c 72 5c 6e 4e 45 57 53 |COME.DAT|\r\nNEWS|
|00001b70| 2e 44 41 54 5c 72 5c 6e | 4c 4f 47 4f 46 46 2e 44 |.DAT\r\n|LOGOFF.D|
|00001b80| 41 54 5c 72 5c 6e 22 29 | 3b 0a 09 66 70 72 69 6e |AT\r\n")|;..fprin|
|00001b90| 74 66 20 28 63 74 6c 5f | 66 64 2c 20 22 5c 30 33 |tf (ctl_|fd, "\03|
|00001ba0| 32 22 29 3b 0a 09 66 63 | 6c 6f 73 65 20 28 63 74 |2");..fc|lose (ct|
|00001bb0| 6c 5f 66 64 29 3b 0a 7d | 0a 0a 57 72 69 74 65 4e |l_fd);.}|..WriteN|
|00001bc0| 65 77 73 72 63 28 29 0a | 2f 2a 0a 20 2a 20 20 52 |ewsrc().|/*. * R|
|00001bd0| 65 77 72 69 74 65 20 74 | 68 65 20 75 70 64 61 74 |ewrite t|he updat|
|00001be0| 65 64 20 2e 6e 65 77 73 | 72 63 20 66 69 6c 65 0a |ed .news|rc file.|
|00001bf0| 20 2a 2f 0a 7b 0a 09 69 | 66 20 28 72 65 61 64 5f | */.{..i|f (read_|
|00001c00| 6f 6e 6c 79 29 20 72 65 | 74 75 72 6e 20 28 30 29 |only) re|turn (0)|
|00001c10| 3b 0a 0a 09 69 66 20 28 | 4e 55 4c 4c 20 3d 3d 20 |;...if (|NULL == |
|00001c20| 28 6e 72 63 5f 66 64 20 | 3d 20 66 6f 70 65 6e 20 |(nrc_fd |= fopen |
|00001c30| 28 6e 72 63 5f 66 69 6c | 65 2c 20 22 77 22 29 29 |(nrc_fil|e, "w"))|
|00001c40| 29 0a 09 7b 0a 09 09 66 | 70 72 69 6e 74 66 20 28 |)..{...f|printf (|
|00001c50| 73 74 64 65 72 72 2c 20 | 22 25 73 3a 20 63 61 6e |stderr, |"%s: can|
|00001c60| 27 74 20 77 72 69 74 65 | 20 25 73 5c 6e 22 2c 0a |'t write| %s\n",.|
|00001c70| 09 09 09 70 72 6f 67 6e | 61 6d 65 2c 20 6e 72 63 |...progn|ame, nrc|
|00001c80| 5f 66 69 6c 65 29 3b 0a | 09 09 72 65 74 75 72 6e |_file);.|..return|
|00001c90| 20 28 30 29 3b 0a 09 7d | 0a 0a 09 2f 2a 20 57 65 | (0);..}|.../* We|
|00001ca0| 20 64 6f 20 74 68 69 73 | 20 72 65 63 75 72 73 69 | do this| recursi|
|00001cb0| 76 65 6c 79 20 74 6f 20 | 70 72 65 73 65 72 76 65 |vely to |preserve|
|00001cc0| 20 74 68 65 20 6f 72 64 | 65 72 20 6f 66 20 74 68 | the ord|er of th|
|00001cd0| 65 20 2e 6e 65 77 73 72 | 63 20 2a 2f 0a 09 77 6e |e .newsr|c */..wn|
|00001ce0| 20 28 6e 72 63 5f 6c 69 | 73 74 29 3b 0a 0a 09 66 | (nrc_li|st);...f|
|00001cf0| 63 6c 6f 73 65 20 28 6e | 72 63 5f 66 64 29 3b 0a |close (n|rc_fd);.|
|00001d00| 7d 0a 0a 77 6e 20 28 6e | 70 29 0a 73 74 72 75 63 |}..wn (n|p).struc|
|00001d10| 74 20 6e 72 63 5f 65 6e | 74 20 2a 6e 70 3b 0a 7b |t nrc_en|t *np;.{|
|00001d20| 0a 09 69 66 20 28 6e 70 | 20 3d 3d 20 4e 55 4c 4c |..if (np| == NULL|
|00001d30| 29 20 72 65 74 75 72 6e | 20 28 30 29 3b 0a 0a 09 |) return| (0);...|
|00001d40| 2f 2a 20 57 72 69 74 65 | 20 74 68 65 20 72 65 73 |/* Write| the res|
|00001d50| 74 20 6f 66 20 74 68 65 | 6d 20 2a 2f 0a 09 77 6e |t of the|m */..wn|
|00001d60| 20 28 6e 70 2d 3e 6e 65 | 78 74 29 3b 0a 0a 09 2f | (np->ne|xt);.../|
|00001d70| 2a 20 57 72 69 74 65 20 | 74 68 69 73 20 6f 6e 65 |* Write |this one|
|00001d80| 20 2a 2f 0a 09 69 66 20 | 28 6e 70 2d 3e 73 75 62 | */..if |(np->sub|
|00001d90| 73 63 72 69 62 65 64 29 | 0a 09 7b 0a 09 09 66 70 |scribed)|..{...fp|
|00001da0| 72 69 6e 74 66 20 28 6e | 72 63 5f 66 64 2c 20 22 |rintf (n|rc_fd, "|
|00001db0| 25 73 3a 20 31 2d 25 64 | 5c 6e 22 2c 20 6e 70 2d |%s: 1-%d|\n", np-|
|00001dc0| 3e 6e 61 6d 65 2c 20 6e | 70 2d 3e 68 69 29 3b 0a |>name, n|p->hi);.|
|00001dd0| 09 7d 0a 09 65 6c 73 65 | 0a 09 7b 0a 09 09 66 70 |.}..else|..{...fp|
|00001de0| 72 69 6e 74 66 20 28 6e | 72 63 5f 66 64 2c 20 22 |rintf (n|rc_fd, "|
|00001df0| 25 73 21 20 31 2d 25 64 | 5c 6e 22 2c 20 6e 70 2d |%s! 1-%d|\n", np-|
|00001e00| 3e 6e 61 6d 65 2c 20 6e | 70 2d 3e 68 69 29 3b 0a |>name, n|p->hi);.|
|00001e10| 09 7d 0a 7d 0a 0a 00 00 | 00 00 00 00 00 00 00 00 |.}.}....|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002000| 69 6e 69 74 2e 63 00 00 | 00 00 00 00 00 00 00 00 |init.c..|........|
|00002010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00002070| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00002080| 20 20 20 31 35 30 30 20 | 20 35 33 35 30 30 30 37 | 1500 | 5350007|
|00002090| 36 33 33 20 20 31 30 34 | 32 31 00 20 30 00 00 00 |633 104|21. 0...|
|000020a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002100| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00002110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002120| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00002130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00002210| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 72 |h>.#incl|ude <str|
|00002220| 69 6e 67 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |ing.h>.#|include |
|00002230| 22 75 71 77 6b 2e 68 22 | 0a 0a 23 64 65 66 69 6e |"uqwk.h"|..#defin|
|00002240| 65 20 51 57 4b 5f 4d 41 | 47 49 43 20 22 50 72 6f |e QWK_MA|GIC "Pro|
|00002250| 64 75 63 65 64 20 62 79 | 20 51 6d 61 69 6c 2e 2e |duced by| Qmail..|
|00002260| 2e 43 6f 70 79 72 69 67 | 68 74 20 28 63 29 20 31 |.Copyrig|ht (c) 1|
|00002270| 39 38 37 20 62 79 20 53 | 70 61 72 6b 77 61 72 65 |987 by S|parkware|
|00002280| 2e 20 20 41 6c 6c 20 72 | 69 67 68 74 73 20 52 65 |. All r|ights Re|
|00002290| 73 65 72 76 65 64 22 0a | 0a 49 6e 69 74 53 74 75 |served".|.InitStu|
|000022a0| 66 66 28 29 0a 2f 2a 0a | 20 2a 20 20 49 6e 69 74 |ff()./*.| * Init|
|000022b0| 69 61 6c 69 7a 65 20 73 | 74 75 66 66 0a 20 2a 2f |ialize s|tuff. */|
|000022c0| 0a 7b 0a 09 63 68 61 72 | 20 6d 73 67 5f 66 6e 61 |.{..char| msg_fna|
|000022d0| 6d 65 5b 50 41 54 48 5f | 4c 45 4e 5d 3b 0a 09 69 |me[PATH_|LEN];..i|
|000022e0| 6e 74 20 6e 3b 0a 0a 09 | 2f 2a 20 4d 61 69 6c 2c |nt n;...|/* Mail,|
|000022f0| 20 63 6f 6e 66 65 72 65 | 6e 63 65 2c 20 65 74 63 | confere|nce, etc|
|00002300| 2e 20 6c 69 73 74 73 20 | 2a 2f 0a 09 6d 61 69 6c |. lists |*/..mail|
|00002310| 5f 6c 69 73 74 20 3d 20 | 4e 55 4c 4c 3b 0a 09 63 |_list = |NULL;..c|
|00002320| 6f 6e 66 5f 6c 69 73 74 | 20 3d 20 4e 55 4c 4c 3b |onf_list| = NULL;|
|00002330| 0a 09 6c 61 73 74 5f 63 | 6f 6e 66 20 3d 20 4e 55 |..last_c|onf = NU|
|00002340| 4c 4c 3b 0a 09 61 63 74 | 5f 6c 69 73 74 20 3d 20 |LL;..act|_list = |
|00002350| 4e 55 4c 4c 3b 0a 09 6e | 72 63 5f 6c 69 73 74 20 |NULL;..n|rc_list |
|00002360| 3d 20 4e 55 4c 4c 3b 0a | 0a 09 2f 2a 20 4d 65 73 |= NULL;.|../* Mes|
|00002370| 73 61 67 65 20 61 6e 64 | 20 63 6f 6e 66 65 72 65 |sage and| confere|
|00002380| 6e 63 65 20 63 6f 75 6e | 74 73 20 2a 2f 0a 09 6d |nce coun|ts */..m|
|00002390| 73 67 5f 63 6e 74 20 3d | 20 30 3b 0a 09 63 6f 6e |sg_cnt =| 0;..con|
|000023a0| 66 5f 63 6e 74 20 3d 20 | 30 3b 0a 0a 09 2f 2a 20 |f_cnt = |0;.../* |
|000023b0| 4f 70 65 6e 20 4d 45 53 | 53 41 47 45 53 2e 44 41 |Open MES|SAGES.DA|
|000023c0| 54 20 2a 2f 0a 09 73 74 | 72 63 70 79 20 28 6d 73 |T */..st|rcpy (ms|
|000023d0| 67 5f 66 6e 61 6d 65 2c | 20 68 6f 6d 65 5f 64 69 |g_fname,| home_di|
|000023e0| 72 29 3b 0a 09 73 74 72 | 63 61 74 20 28 6d 73 67 |r);..str|cat (msg|
|000023f0| 5f 66 6e 61 6d 65 2c 20 | 22 2f 22 29 3b 0a 09 73 |_fname, |"/");..s|
|00002400| 74 72 63 61 74 20 28 6d | 73 67 5f 66 6e 61 6d 65 |trcat (m|sg_fname|
|00002410| 2c 20 22 6d 65 73 73 61 | 67 65 73 2e 64 61 74 22 |, "messa|ges.dat"|
|00002420| 29 3b 0a 0a 09 69 66 20 | 28 4e 55 4c 4c 20 3d 3d |);...if |(NULL ==|
|00002430| 20 28 6d 73 67 5f 66 64 | 20 3d 20 66 6f 70 65 6e | (msg_fd| = fopen|
|00002440| 20 28 6d 73 67 5f 66 6e | 61 6d 65 2c 20 22 77 22 | (msg_fn|ame, "w"|
|00002450| 29 29 29 0a 09 7b 0a 09 | 09 66 70 72 69 6e 74 66 |)))..{..|.fprintf|
|00002460| 20 28 73 74 64 65 72 72 | 2c 20 22 25 73 3a 20 63 | (stderr|, "%s: c|
|00002470| 61 6e 27 74 20 6f 70 65 | 6e 20 25 73 5c 6e 22 2c |an't ope|n %s\n",|
|00002480| 20 70 72 6f 67 6e 61 6d | 65 2c 20 6d 73 67 5f 66 | prognam|e, msg_f|
|00002490| 6e 61 6d 65 29 3b 0a 09 | 09 65 78 69 74 20 28 30 |name);..|.exit (0|
|000024a0| 29 3b 0a 09 7d 0a 0a 09 | 2f 2a 20 57 72 69 74 65 |);..}...|/* Write|
|000024b0| 20 6d 61 67 69 63 20 73 | 74 72 69 6e 67 20 74 6f | magic s|tring to|
|000024c0| 20 4d 45 53 53 41 47 45 | 53 2e 44 41 54 20 2a 2f | MESSAGE|S.DAT */|
|000024d0| 0a 09 66 70 72 69 6e 74 | 66 20 28 6d 73 67 5f 66 |..fprint|f (msg_f|
|000024e0| 64 2c 20 51 57 4b 5f 4d | 41 47 49 43 29 3b 0a 09 |d, QWK_M|AGIC);..|
|000024f0| 6e 20 3d 20 31 32 38 20 | 2d 20 73 74 72 6c 65 6e |n = 128 |- strlen|
|00002500| 20 28 51 57 4b 5f 4d 41 | 47 49 43 29 3b 0a 09 77 | (QWK_MA|GIC);..w|
|00002510| 68 69 6c 65 20 28 6e 2d | 2d 29 20 66 70 75 74 63 |hile (n-|-) fputc|
|00002520| 20 28 27 20 27 2c 20 6d | 73 67 5f 66 64 29 3b 0a | (' ', m|sg_fd);.|
|00002530| 09 62 6c 6b 5f 63 6e 74 | 20 3d 20 32 3b 0a 7d 0a |.blk_cnt| = 2;.}.|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 6d 61 69 6c 2e 63 00 00 | 00 00 00 00 00 00 00 00 |mail.c..|........|
|00002610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00002670| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00002680| 20 20 20 37 37 35 37 20 | 20 35 33 35 30 30 30 37 | 7757 | 5350007|
|00002690| 36 33 33 20 20 31 30 34 | 32 34 00 20 30 00 00 00 |633 104|24. 0...|
|000026a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00002810| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 22 75 71 77 |h>.#incl|ude "uqw|
|00002820| 6b 2e 68 22 0a 0a 2f 2a | 0a 20 2a 20 20 41 6c 6c |k.h"../*|. * All|
|00002830| 20 73 6f 72 74 73 20 6f | 66 20 73 74 75 66 66 20 | sorts o|f stuff |
|00002840| 74 6f 20 64 6f 20 6d 61 | 69 6c 20 70 72 6f 63 65 |to do ma|il proce|
|00002850| 73 73 69 6e 67 0a 20 2a | 2f 0a 0a 46 49 4c 45 20 |ssing. *|/..FILE |
|00002860| 2a 6d 61 69 6c 5f 66 64 | 3b 09 09 09 2f 2a 20 46 |*mail_fd|;.../* F|
|00002870| 6f 72 20 6d 61 69 6c 20 | 73 70 6f 6f 6c 20 2a 2f |or mail |spool */|
|00002880| 0a 73 74 72 75 63 74 20 | 6d 61 69 6c 5f 65 6e 74 |.struct |mail_ent|
|00002890| 20 2a 6c 61 73 74 5f 6d | 70 3b 09 2f 2a 20 50 6f | *last_m|p;./* Po|
|000028a0| 69 6e 74 73 20 74 6f 20 | 6c 61 73 74 20 6d 61 69 |ints to |last mai|
|000028b0| 6c 20 6c 69 73 74 20 65 | 6e 74 72 79 20 2a 2f 0a |l list e|ntry */.|
|000028c0| 0a 44 6f 4d 61 69 6c 20 | 28 29 0a 2f 2a 0a 20 2a |.DoMail |()./*. *|
|000028d0| 20 20 50 72 6f 63 65 73 | 73 20 6d 61 69 6c 20 69 | Proces|s mail i|
|000028e0| 6e 74 6f 20 51 57 4b 20 | 70 61 63 6b 65 74 0a 20 |nto QWK |packet. |
|000028f0| 2a 2f 0a 7b 0a 09 73 74 | 72 75 63 74 20 6d 61 69 |*/.{..st|ruct mai|
|00002900| 6c 5f 65 6e 74 20 2a 6d | 61 69 6c 70 3b 0a 0a 09 |l_ent *m|ailp;...|
|00002910| 2f 2a 20 4f 70 65 6e 20 | 74 68 65 20 6d 61 69 6c |/* Open |the mail|
|00002920| 20 73 70 6f 6f 6c 20 2a | 2f 0a 09 69 66 20 28 4e | spool *|/..if (N|
|00002930| 55 4c 4c 20 3d 3d 20 28 | 6d 61 69 6c 5f 66 64 20 |ULL == (|mail_fd |
|00002940| 3d 20 66 6f 70 65 6e 20 | 28 6d 61 69 6c 5f 66 69 |= fopen |(mail_fi|
|00002950| 6c 65 2c 20 22 72 22 29 | 29 29 0a 09 7b 0a 09 09 |le, "r")|))..{...|
|00002960| 66 70 72 69 6e 74 66 20 | 28 73 74 64 65 72 72 2c |fprintf |(stderr,|
|00002970| 20 22 25 73 3a 20 63 61 | 6e 27 74 20 6f 70 65 6e | "%s: ca|n't open|
|00002980| 20 25 73 5c 6e 22 2c 20 | 70 72 6f 67 6e 61 6d 65 | %s\n", |progname|
|00002990| 2c 20 6d 61 69 6c 5f 66 | 69 6c 65 29 3b 0a 09 09 |, mail_f|ile);...|
|000029a0| 70 65 72 72 6f 72 20 28 | 70 72 6f 67 6e 61 6d 65 |perror (|progname|
|000029b0| 29 3b 0a 09 09 72 65 74 | 75 72 6e 20 28 30 29 3b |);...ret|urn (0);|
|000029c0| 0a 09 7d 0a 0a 09 2f 2a | 20 44 65 66 69 6e 65 20 |..}.../*| Define |
|000029d0| 74 68 65 20 6d 61 69 6c | 20 22 63 6f 6e 66 65 72 |the mail| "confer|
|000029e0| 65 6e 63 65 22 20 2a 2f | 0a 09 4e 65 77 43 6f 6e |ence" */|..NewCon|
|000029f0| 66 65 72 65 6e 63 65 20 | 28 4d 41 49 4c 5f 43 4f |ference |(MAIL_CO|
|00002a00| 4e 46 5f 4e 41 4d 45 29 | 3b 0a 0a 09 2f 2a 20 43 |NF_NAME)|;.../* C|
|00002a10| 6f 6e 73 74 72 75 63 74 | 20 74 68 65 20 6d 61 69 |onstruct| the mai|
|00002a20| 6c 20 6c 69 6e 6b 65 64 | 20 6c 69 73 74 20 2a 2f |l linked| list */|
|00002a30| 0a 09 4d 61 6b 65 4d 61 | 69 6c 4c 69 73 74 20 28 |..MakeMa|ilList (|
|00002a40| 29 3b 0a 0a 09 2f 2a 20 | 57 61 6c 6b 20 74 68 72 |);.../* |Walk thr|
|00002a50| 6f 75 67 68 20 61 6c 6c | 20 74 68 65 20 6d 65 73 |ough all| the mes|
|00002a60| 73 61 67 65 73 20 2a 2f | 0a 09 6d 61 69 6c 70 20 |sages */|..mailp |
|00002a70| 3d 20 6d 61 69 6c 5f 6c | 69 73 74 3b 0a 0a 09 77 |= mail_l|ist;...w|
|00002a80| 68 69 6c 65 20 28 6d 61 | 69 6c 70 20 21 3d 20 4e |hile (ma|ilp != N|
|00002a90| 55 4c 4c 29 0a 09 7b 0a | 09 09 44 6f 4d 65 73 73 |ULL)..{.|..DoMess|
|00002aa0| 61 67 65 20 28 6d 61 69 | 6c 70 29 3b 0a 09 09 6d |age (mai|lp);...m|
|00002ab0| 61 69 6c 70 20 3d 20 6d | 61 69 6c 70 2d 3e 6e 65 |ailp = m|ailp->ne|
|00002ac0| 78 74 3b 0a 09 7d 0a 0a | 09 66 63 6c 6f 73 65 20 |xt;..}..|.fclose |
|00002ad0| 28 6d 61 69 6c 5f 66 64 | 29 3b 0a 09 66 63 6c 6f |(mail_fd|);..fclo|
|00002ae0| 73 65 20 28 6e 64 78 5f | 66 64 29 3b 0a 0a 09 2f |se (ndx_|fd);.../|
|00002af0| 2a 20 4e 6f 77 20 65 6d | 70 74 79 20 74 68 65 20 |* Now em|pty the |
|00002b00| 6d 61 69 6c 20 62 6f 78 | 20 2a 2f 0a 09 69 66 20 |mail box| */..if |
|00002b10| 28 21 72 65 61 64 5f 6f | 6e 6c 79 29 0a 09 7b 0a |(!read_o|nly)..{.|
|00002b20| 09 09 69 66 20 28 4e 55 | 4c 4c 20 3d 3d 20 28 6d |..if (NU|LL == (m|
|00002b30| 61 69 6c 5f 66 64 20 3d | 20 66 6f 70 65 6e 20 28 |ail_fd =| fopen (|
|00002b40| 6d 61 69 6c 5f 66 69 6c | 65 2c 20 22 77 22 29 29 |mail_fil|e, "w"))|
|00002b50| 29 0a 09 09 7b 0a 09 09 | 09 66 70 72 69 6e 74 66 |)...{...|.fprintf|
|00002b60| 20 28 73 74 64 65 72 72 | 2c 20 22 25 73 3a 20 63 | (stderr|, "%s: c|
|00002b70| 61 6e 27 74 20 77 72 69 | 74 65 20 25 73 5c 6e 22 |an't wri|te %s\n"|
|00002b80| 2c 20 70 72 6f 67 6e 61 | 6d 65 2c 0a 09 09 09 09 |, progna|me,.....|
|00002b90| 09 09 09 09 6d 61 69 6c | 5f 66 69 6c 65 29 3b 0a |....mail|_file);.|
|00002ba0| 09 09 7d 0a 09 09 65 6c | 73 65 0a 09 09 7b 0a 09 |..}...el|se...{..|
|00002bb0| 09 09 66 63 6c 6f 73 65 | 20 28 6d 61 69 6c 5f 66 |..fclose| (mail_f|
|00002bc0| 64 29 3b 0a 09 09 7d 0a | 09 7d 0a 7d 0a 0a 4d 61 |d);...}.|.}.}..Ma|
|00002bd0| 6b 65 4d 61 69 6c 4c 69 | 73 74 20 28 29 0a 2f 2a |keMailLi|st ()./*|
|00002be0| 0a 20 2a 20 20 43 6f 6e | 73 74 72 75 63 74 20 6c |. * Con|struct l|
|00002bf0| 69 6e 6b 65 64 20 6c 69 | 73 74 20 6f 66 20 70 6f |inked li|st of po|
|00002c00| 69 6e 74 65 72 73 20 74 | 6f 20 69 6e 64 69 76 69 |inters t|o indivi|
|00002c10| 64 75 61 6c 20 6d 65 73 | 73 61 67 65 73 20 69 6e |dual mes|sages in|
|00002c20| 0a 20 2a 20 20 74 68 65 | 20 6d 61 69 6c 20 73 70 |. * the| mail sp|
|00002c30| 6f 6f 6c 2e 0a 20 2a 2f | 0a 7b 0a 09 6c 6f 6e 67 |ool.. */|.{..long|
|00002c40| 20 6f 66 66 73 65 74 3b | 0a 0a 09 6c 61 73 74 5f | offset;|...last_|
|00002c50| 6d 70 20 3d 20 4e 55 4c | 4c 3b 0a 0a 09 2f 2a 20 |mp = NUL|L;.../* |
|00002c60| 52 65 61 64 20 74 68 72 | 6f 75 67 68 2c 20 6c 6f |Read thr|ough, lo|
|00002c70| 6f 6b 69 6e 67 20 66 6f | 72 20 22 46 72 6f 6d 22 |oking fo|r "From"|
|00002c80| 20 6c 69 6e 65 73 20 2a | 2f 0a 09 6f 66 66 73 65 | lines *|/..offse|
|00002c90| 74 20 3d 20 66 74 65 6c | 6c 20 28 6d 61 69 6c 5f |t = ftel|l (mail_|
|00002ca0| 66 64 29 3b 0a 09 77 68 | 69 6c 65 20 28 4e 55 4c |fd);..wh|ile (NUL|
|00002cb0| 4c 20 21 3d 20 46 67 65 | 74 73 20 28 62 75 66 2c |L != Fge|ts (buf,|
|00002cc0| 20 42 55 46 5f 4c 45 4e | 2c 20 6d 61 69 6c 5f 66 | BUF_LEN|, mail_f|
|00002cd0| 64 29 29 0a 09 7b 0a 09 | 09 69 66 20 28 21 73 74 |d))..{..|.if (!st|
|00002ce0| 72 6e 63 6d 70 20 28 62 | 75 66 2c 20 22 46 72 6f |rncmp (b|uf, "Fro|
|00002cf0| 6d 20 22 2c 20 20 35 29 | 29 0a 09 09 7b 0a 09 09 |m ", 5)|)...{...|
|00002d00| 09 44 6f 46 72 6f 6d 4c | 69 6e 65 20 28 6f 66 66 |.DoFromL|ine (off|
|00002d10| 73 65 74 29 3b 0a 09 09 | 7d 0a 09 09 6f 66 66 73 |set);...|}...offs|
|00002d20| 65 74 20 3d 20 66 74 65 | 6c 6c 20 28 6d 61 69 6c |et = fte|ll (mail|
|00002d30| 5f 66 64 29 3b 0a 09 7d | 0a 09 69 66 20 28 6c 61 |_fd);..}|..if (la|
|00002d40| 73 74 5f 6d 70 20 21 3d | 20 4e 55 4c 4c 29 20 6c |st_mp !=| NULL) l|
|00002d50| 61 73 74 5f 6d 70 2d 3e | 65 6e 64 20 3d 20 6f 66 |ast_mp->|end = of|
|00002d60| 66 73 65 74 3b 0a 7d 0a | 0a 44 6f 46 72 6f 6d 4c |fset;.}.|.DoFromL|
|00002d70| 69 6e 65 20 28 6f 66 66 | 73 65 74 29 0a 6c 6f 6e |ine (off|set).lon|
|00002d80| 67 20 6f 66 66 73 65 74 | 3b 0a 7b 0a 09 73 74 72 |g offset|;.{..str|
|00002d90| 75 63 74 20 6d 61 69 6c | 5f 65 6e 74 20 2a 6d 70 |uct mail|_ent *mp|
|00002da0| 3b 0a 0a 09 2f 2a 20 47 | 65 74 20 73 70 61 63 65 |;.../* G|et space|
|00002db0| 20 66 6f 72 20 6e 65 77 | 20 6d 61 69 6c 20 6c 69 | for new| mail li|
|00002dc0| 73 74 20 65 6e 74 72 79 | 20 2a 2f 0a 09 69 66 20 |st entry| */..if |
|00002dd0| 28 4e 55 4c 4c 3d 3d 28 | 6d 70 3d 28 73 74 72 75 |(NULL==(|mp=(stru|
|00002de0| 63 74 20 6d 61 69 6c 5f | 65 6e 74 20 2a 29 20 6d |ct mail_|ent *) m|
|00002df0| 61 6c 6c 6f 63 28 73 69 | 7a 65 6f 66 28 73 74 72 |alloc(si|zeof(str|
|00002e00| 75 63 74 20 6d 61 69 6c | 5f 65 6e 74 29 29 29 29 |uct mail|_ent))))|
|00002e10| 0a 09 7b 0a 09 09 66 70 | 72 69 6e 74 66 20 28 73 |..{...fp|rintf (s|
|00002e20| 74 64 65 72 72 2c 20 22 | 25 73 3a 20 6f 75 74 20 |tderr, "|%s: out |
|00002e30| 6f 66 20 6d 65 6d 6f 72 | 79 5c 6e 22 2c 20 70 72 |of memor|y\n", pr|
|00002e40| 6f 67 6e 61 6d 65 29 3b | 0a 09 09 65 78 69 74 20 |ogname);|...exit |
|00002e50| 28 30 29 3b 0a 09 7d 0a | 0a 09 2f 2a 20 46 69 6c |(0);..}.|../* Fil|
|00002e60| 6c 20 69 6e 20 6f 66 66 | 73 65 74 20 2a 2f 0a 09 |l in off|set */..|
|00002e70| 6d 70 2d 3e 62 65 67 69 | 6e 20 3d 20 6f 66 66 73 |mp->begi|n = offs|
|00002e80| 65 74 3b 0a 0a 09 69 66 | 20 28 6c 61 73 74 5f 6d |et;...if| (last_m|
|00002e90| 70 20 3d 3d 20 4e 55 4c | 4c 29 0a 09 7b 0a 09 09 |p == NUL|L)..{...|
|00002ea0| 2f 2a 20 54 68 69 73 20 | 69 73 20 66 69 72 73 74 |/* This |is first|
|00002eb0| 20 6d 65 73 73 61 67 65 | 20 2a 2f 0a 09 09 6d 61 | message| */...ma|
|00002ec0| 69 6c 5f 6c 69 73 74 20 | 3d 20 6d 70 3b 0a 09 7d |il_list |= mp;..}|
|00002ed0| 0a 09 65 6c 73 65 0a 09 | 7b 0a 09 09 2f 2a 20 41 |..else..|{.../* A|
|00002ee0| 64 64 20 74 6f 20 65 6e | 64 20 6f 66 20 6c 69 73 |dd to en|d of lis|
|00002ef0| 74 20 2a 2f 0a 09 09 6c | 61 73 74 5f 6d 70 2d 3e |t */...l|ast_mp->|
|00002f00| 6e 65 78 74 20 3d 20 6d | 70 3b 0a 09 09 6c 61 73 |next = m|p;...las|
|00002f10| 74 5f 6d 70 2d 3e 65 6e | 64 20 3d 20 6f 66 66 73 |t_mp->en|d = offs|
|00002f20| 65 74 3b 0a 09 7d 0a 0a | 09 6d 70 2d 3e 6e 65 78 |et;..}..|.mp->nex|
|00002f30| 74 20 3d 20 4e 55 4c 4c | 3b 0a 09 6c 61 73 74 5f |t = NULL|;..last_|
|00002f40| 6d 70 20 3d 20 6d 70 3b | 0a 7d 0a 0a 44 6f 4d 65 |mp = mp;|.}..DoMe|
|00002f50| 73 73 61 67 65 20 28 6d | 70 29 0a 73 74 72 75 63 |ssage (m|p).struc|
|00002f60| 74 20 6d 61 69 6c 5f 65 | 6e 74 20 2a 6d 70 3b 0a |t mail_e|nt *mp;.|
|00002f70| 2f 2a 0a 20 2a 20 20 43 | 6f 6e 76 65 72 74 20 61 |/*. * C|onvert a|
|00002f80| 20 6d 65 73 73 61 67 65 | 20 74 6f 20 51 57 4b 20 | message| to QWK |
|00002f90| 66 6f 72 6d 61 74 0a 20 | 2a 2f 0a 7b 0a 09 73 74 |format. |*/.{..st|
|00002fa0| 72 75 63 74 20 71 77 6b | 5f 68 64 72 20 68 64 72 |ruct qwk|_hdr hdr|
|00002fb0| 3b 0a 09 63 68 61 72 20 | 63 5b 50 41 54 48 5f 4c |;..char |c[PATH_L|
|00002fc0| 45 4e 5d 2c 20 2a 65 6f | 66 2c 20 6e 64 78 5b 35 |EN], *eo|f, ndx[5|
|00002fd0| 5d 3b 0a 09 69 6e 74 20 | 6f 75 74 5f 62 79 74 65 |];..int |out_byte|
|00002fe0| 73 2c 20 6e 3b 0a 0a 09 | 2f 2a 20 57 72 69 74 65 |s, n;...|/* Write|
|00002ff0| 20 74 68 65 20 6e 64 78 | 20 66 69 6c 65 20 65 6e | the ndx| file en|
|00003000| 74 72 79 20 2a 2f 0a 09 | 69 6e 74 74 6f 6d 73 20 |try */..|inttoms |
|00003010| 28 62 6c 6b 5f 63 6e 74 | 2c 20 6e 64 78 29 3b 0a |(blk_cnt|, ndx);.|
|00003020| 09 6e 64 78 5b 34 5d 20 | 3d 20 63 6f 6e 66 5f 63 |.ndx[4] |= conf_c|
|00003030| 6e 74 2d 31 3b 0a 09 66 | 77 72 69 74 65 20 28 6e |nt-1;..f|write (n|
|00003040| 64 78 2c 20 35 2c 20 31 | 2c 20 6e 64 78 5f 66 64 |dx, 5, 1|, ndx_fd|
|00003050| 29 3b 0a 0a 09 53 70 61 | 63 65 73 20 28 26 68 64 |);...Spa|ces (&hd|
|00003060| 72 2c 20 31 32 38 29 3b | 0a 0a 09 2f 2a 20 46 69 |r, 128);|.../* Fi|
|00003070| 6c 6c 20 69 6e 20 74 68 | 65 20 68 65 61 64 65 72 |ll in th|e header|
|00003080| 20 66 69 65 6c 64 73 20 | 77 65 20 63 61 6e 20 64 | fields |we can d|
|00003090| 6f 20 6e 6f 77 20 2a 2f | 0a 09 68 64 72 2e 73 74 |o now */|..hdr.st|
|000030a0| 61 74 75 73 20 3d 20 51 | 57 4b 5f 50 52 49 56 41 |atus = Q|WK_PRIVA|
|000030b0| 54 45 3b 0a 09 50 61 64 | 4e 75 6d 20 28 6d 73 67 |TE;..Pad|Num (msg|
|000030c0| 5f 63 6e 74 2c 20 68 64 | 72 2e 6e 75 6d 62 65 72 |_cnt, hd|r.number|
|000030d0| 2c 20 37 29 3b 0a 09 53 | 70 61 63 65 73 20 28 68 |, 7);..S|paces (h|
|000030e0| 64 72 2e 70 61 73 73 77 | 6f 72 64 2c 20 31 32 29 |dr.passw|ord, 12)|
|000030f0| 3b 0a 09 53 70 61 63 65 | 73 20 28 68 64 72 2e 72 |;..Space|s (hdr.r|
|00003100| 65 66 65 72 2c 20 38 29 | 3b 0a 09 68 64 72 2e 66 |efer, 8)|;..hdr.f|
|00003110| 6c 61 67 20 3d 20 51 57 | 4b 5f 41 43 54 5f 46 4c |lag = QW|K_ACT_FL|
|00003120| 41 47 3b 0a 09 49 6e 74 | 4e 75 6d 20 28 63 6f 6e |AG;..Int|Num (con|
|00003130| 66 5f 63 6e 74 2d 31 2c | 20 68 64 72 2e 63 6f 6e |f_cnt-1,| hdr.con|
|00003140| 66 65 72 65 6e 63 65 29 | 3b 0a 09 49 6e 74 4e 75 |ference)|;..IntNu|
|00003150| 6d 20 28 6d 73 67 5f 63 | 6e 74 2b 31 2c 20 68 64 |m (msg_c|nt+1, hd|
|00003160| 72 2e 6d 73 67 5f 6e 75 | 6d 29 3b 0a 09 68 64 72 |r.msg_nu|m);..hdr|
|00003170| 2e 74 61 67 20 3d 20 27 | 20 27 3b 0a 0a 09 6d 73 |.tag = '| ';...ms|
|00003180| 67 5f 63 6e 74 2b 2b 3b | 0a 0a 09 2f 2a 20 53 65 |g_cnt++;|.../* Se|
|00003190| 65 6b 20 74 6f 20 73 74 | 61 72 74 20 6f 66 20 6d |ek to st|art of m|
|000031a0| 65 73 73 61 67 65 20 2a | 2f 0a 09 66 73 65 65 6b |essage *|/..fseek|
|000031b0| 20 28 6d 61 69 6c 5f 66 | 64 2c 20 6d 70 2d 3e 62 | (mail_f|d, mp->b|
|000031c0| 65 67 69 6e 2c 20 30 29 | 3b 0a 0a 09 2f 2a 20 52 |egin, 0)|;.../* R|
|000031d0| 65 61 64 20 74 68 65 20 | 46 72 6f 6d 20 6c 69 6e |ead the |From lin|
|000031e0| 65 20 2a 2f 0a 09 46 67 | 65 74 73 20 28 62 75 66 |e */..Fg|ets (buf|
|000031f0| 2c 20 42 55 46 5f 4c 45 | 4e 2c 20 6d 61 69 6c 5f |, BUF_LE|N, mail_|
|00003200| 66 64 29 3b 0a 0a 09 2f | 2a 20 54 68 65 20 73 65 |fd);.../|* The se|
|00003210| 63 6f 6e 64 20 66 69 65 | 6c 64 20 6f 66 20 74 68 |cond fie|ld of th|
|00003220| 65 20 46 72 6f 6d 20 6c | 69 6e 65 20 69 73 20 61 |e From l|ine is a|
|00003230| 73 73 75 6d 65 64 20 74 | 6f 20 62 65 20 77 68 6f |ssumed t|o be who|
|00003240| 0a 09 20 20 20 73 65 6e | 74 20 74 68 65 20 6d 65 |.. sen|t the me|
|00003250| 73 73 61 67 65 20 2a 2f | 0a 09 73 73 63 61 6e 66 |ssage */|..sscanf|
|00003260| 20 28 26 62 75 66 5b 35 | 5d 2c 20 22 25 73 22 2c | (&buf[5|], "%s",|
|00003270| 20 63 29 3b 0a 09 50 61 | 64 53 74 72 69 6e 67 20 | c);..Pa|dString |
|00003280| 28 63 2c 20 68 64 72 2e | 66 72 6f 6d 2c 20 32 35 |(c, hdr.|from, 25|
|00003290| 29 3b 0a 0a 09 2f 2a 20 | 4e 6f 77 20 72 65 61 64 |);.../* |Now read|
|000032a0| 20 74 68 72 6f 75 67 68 | 20 68 65 61 64 65 72 20 | through| header |
|000032b0| 6c 69 6e 65 73 2c 20 6c | 6f 6f 6b 69 6e 67 20 66 |lines, l|ooking f|
|000032c0| 6f 72 20 6f 6e 65 73 20 | 77 65 20 6e 65 65 64 20 |or ones |we need |
|000032d0| 2a 2f 0a 09 65 6f 66 20 | 3d 20 46 67 65 74 73 20 |*/..eof |= Fgets |
|000032e0| 28 62 75 66 2c 20 42 55 | 46 5f 4c 45 4e 2c 20 6d |(buf, BU|F_LEN, m|
|000032f0| 61 69 6c 5f 66 64 29 3b | 0a 09 77 68 69 6c 65 20 |ail_fd);|..while |
|00003300| 28 20 28 30 20 21 3d 20 | 73 74 72 6c 65 6e 28 62 |( (0 != |strlen(b|
|00003310| 75 66 29 29 20 26 26 20 | 28 65 6f 66 20 21 3d 20 |uf)) && |(eof != |
|00003320| 4e 55 4c 4c 29 20 29 0a | 09 7b 0a 09 09 69 66 20 |NULL) ).|.{...if |
|00003330| 28 21 73 74 72 6e 63 6d | 70 20 28 62 75 66 2c 20 |(!strncm|p (buf, |
|00003340| 22 44 61 74 65 3a 20 22 | 2c 20 36 29 29 0a 09 09 |"Date: "|, 6))...|
|00003350| 7b 0a 09 09 09 50 61 72 | 73 65 44 61 74 65 20 28 |{....Par|seDate (|
|00003360| 26 62 75 66 5b 36 5d 2c | 20 26 68 64 72 29 3b 0a |&buf[6],| &hdr);.|
|00003370| 09 09 7d 0a 09 09 65 6c | 73 65 20 69 66 20 28 21 |..}...el|se if (!|
|00003380| 73 74 72 6e 63 6d 70 20 | 28 62 75 66 2c 20 22 54 |strncmp |(buf, "T|
|00003390| 6f 3a 20 22 2c 20 34 29 | 29 0a 09 09 7b 0a 09 09 |o: ", 4)|)...{...|
|000033a0| 09 50 61 64 53 74 72 69 | 6e 67 20 28 26 62 75 66 |.PadStri|ng (&buf|
|000033b0| 5b 34 5d 2c 20 68 64 72 | 2e 74 6f 2c 20 32 35 29 |[4], hdr|.to, 25)|
|000033c0| 3b 0a 09 09 7d 0a 09 09 | 65 6c 73 65 20 69 66 20 |;...}...|else if |
|000033d0| 28 21 73 74 72 6e 63 6d | 70 20 28 62 75 66 2c 20 |(!strncm|p (buf, |
|000033e0| 22 53 75 62 6a 65 63 74 | 3a 20 22 2c 20 39 29 29 |"Subject|: ", 9))|
|000033f0| 0a 09 09 7b 0a 09 09 09 | 50 61 64 53 74 72 69 6e |...{....|PadStrin|
|00003400| 67 20 28 26 62 75 66 5b | 39 5d 2c 20 68 64 72 2e |g (&buf[|9], hdr.|
|00003410| 73 75 62 6a 65 63 74 2c | 20 32 35 29 3b 0a 09 09 |subject,| 25);...|
|00003420| 7d 0a 2f 2a 0a 09 09 65 | 6c 73 65 20 69 66 20 28 |}./*...e|lse if (|
|00003430| 21 73 74 72 6e 63 6d 70 | 20 28 62 75 66 2c 20 22 |!strncmp| (buf, "|
|00003440| 46 72 6f 6d 3a 20 22 2c | 20 36 29 29 0a 09 09 7b |From: ",| 6))...{|
|00003450| 0a 09 09 09 50 61 64 53 | 74 72 69 6e 67 20 28 26 |....PadS|tring (&|
|00003460| 62 75 66 5b 36 5d 2c 20 | 68 64 72 2e 66 72 6f 6d |buf[6], |hdr.from|
|00003470| 2c 20 32 35 29 3b 0a 09 | 09 7d 0a 2a 2f 0a 0a 09 |, 25);..|.}.*/...|
|00003480| 09 65 6f 66 20 3d 20 46 | 67 65 74 73 20 28 62 75 |.eof = F|gets (bu|
|00003490| 66 2c 20 42 55 46 5f 4c | 45 4e 2c 20 6d 61 69 6c |f, BUF_L|EN, mail|
|000034a0| 5f 66 64 29 3b 0a 09 7d | 0a 09 6d 70 2d 3e 74 65 |_fd);..}|..mp->te|
|000034b0| 78 74 20 3d 20 66 74 65 | 6c 6c 20 28 6d 61 69 6c |xt = fte|ll (mail|
|000034c0| 5f 66 64 29 3b 0a 0a 09 | 2f 2a 20 46 69 6c 6c 20 |_fd);...|/* Fill |
|000034d0| 69 6e 20 62 6c 6f 63 6b | 20 63 6f 75 6e 74 20 2a |in block| count *|
|000034e0| 2f 0a 09 69 66 20 28 69 | 6e 63 5f 68 64 72 73 29 |/..if (i|nc_hdrs)|
|000034f0| 0a 09 7b 0a 09 09 50 61 | 64 4e 75 6d 20 28 32 2b |..{...Pa|dNum (2+|
|00003500| 28 6d 70 2d 3e 65 6e 64 | 2d 6d 70 2d 3e 62 65 67 |(mp->end|-mp->beg|
|00003510| 69 6e 29 2f 31 32 38 2c | 20 68 64 72 2e 62 6c 6f |in)/128,| hdr.blo|
|00003520| 63 6b 73 2c 20 36 29 3b | 0a 09 09 62 6c 6b 5f 63 |cks, 6);|...blk_c|
|00003530| 6e 74 20 2b 3d 20 28 31 | 2b 28 6d 70 2d 3e 65 6e |nt += (1|+(mp->en|
|00003540| 64 20 2d 20 6d 70 2d 3e | 62 65 67 69 6e 29 2f 31 |d - mp->|begin)/1|
|00003550| 32 38 29 3b 0a 09 7d 0a | 09 65 6c 73 65 0a 09 7b |28);..}.|.else..{|
|00003560| 0a 09 09 50 61 64 4e 75 | 6d 20 28 32 2b 28 6d 70 |...PadNu|m (2+(mp|
|00003570| 2d 3e 65 6e 64 2d 6d 70 | 2d 3e 74 65 78 74 29 2f |->end-mp|->text)/|
|00003580| 31 32 38 2c 20 68 64 72 | 2e 62 6c 6f 63 6b 73 2c |128, hdr|.blocks,|
|00003590| 20 36 29 3b 0a 09 09 62 | 6c 6b 5f 63 6e 74 20 2b | 6);...b|lk_cnt +|
|000035a0| 3d 20 28 31 2b 28 6d 70 | 2d 3e 65 6e 64 20 2d 20 |= (1+(mp|->end - |
|000035b0| 6d 70 2d 3e 74 65 78 74 | 29 2f 31 32 38 29 3b 0a |mp->text|)/128);.|
|000035c0| 09 7d 0a 0a 09 2f 2a 20 | 57 72 69 74 65 20 6f 75 |.}.../* |Write ou|
|000035d0| 74 20 74 68 65 20 6d 65 | 73 73 61 67 65 20 68 65 |t the me|ssage he|
|000035e0| 61 64 65 72 20 2a 2f 0a | 09 66 77 72 69 74 65 20 |ader */.|.fwrite |
|000035f0| 28 26 68 64 72 2c 20 31 | 32 38 2c 20 31 2c 20 6d |(&hdr, 1|28, 1, m|
|00003600| 73 67 5f 66 64 29 3b 0a | 09 62 6c 6b 5f 63 6e 74 |sg_fd);.|.blk_cnt|
|00003610| 2b 2b 3b 0a 0a 09 2f 2a | 20 4e 6f 77 20 77 72 69 |++;.../*| Now wri|
|00003620| 74 65 20 74 68 65 20 6d | 65 73 73 61 67 65 20 74 |te the m|essage t|
|00003630| 65 78 74 20 2a 2f 0a 09 | 69 66 20 28 69 6e 63 5f |ext */..|if (inc_|
|00003640| 68 64 72 73 29 20 66 73 | 65 65 6b 20 28 6d 61 69 |hdrs) fs|eek (mai|
|00003650| 6c 5f 66 64 2c 20 6d 70 | 2d 3e 62 65 67 69 6e 2c |l_fd, mp|->begin,|
|00003660| 20 30 29 3b 0a 09 6f 75 | 74 5f 62 79 74 65 73 20 | 0);..ou|t_bytes |
|00003670| 3d 20 30 3b 0a 0a 09 65 | 6f 66 20 3d 20 46 67 65 |= 0;...e|of = Fge|
|00003680| 74 73 20 28 62 75 66 2c | 20 42 55 46 5f 4c 45 4e |ts (buf,| BUF_LEN|
|00003690| 2c 20 6d 61 69 6c 5f 66 | 64 29 3b 0a 09 64 6f 0a |, mail_f|d);..do.|
|000036a0| 09 7b 0a 09 09 6e 20 3d | 20 73 74 72 6c 65 6e 20 |.{...n =| strlen |
|000036b0| 28 62 75 66 29 3b 0a 09 | 09 66 77 72 69 74 65 20 |(buf);..|.fwrite |
|000036c0| 28 62 75 66 2c 20 6e 2c | 20 31 2c 20 6d 73 67 5f |(buf, n,| 1, msg_|
|000036d0| 66 64 29 3b 0a 09 09 6f | 75 74 5f 62 79 74 65 73 |fd);...o|ut_bytes|
|000036e0| 20 2b 3d 20 6e 3b 0a 09 | 09 69 66 20 28 6e 20 3c | += n;..|.if (n <|
|000036f0| 20 42 55 46 5f 4c 45 4e | 2d 31 29 0a 09 09 7b 0a | BUF_LEN|-1)...{.|
|00003700| 09 09 09 66 70 75 74 63 | 20 28 51 57 4b 5f 45 4f |...fputc| (QWK_EO|
|00003710| 4c 2c 20 6d 73 67 5f 66 | 64 29 3b 0a 09 09 09 6f |L, msg_f|d);....o|
|00003720| 75 74 5f 62 79 74 65 73 | 2b 2b 3b 0a 09 09 7d 0a |ut_bytes|++;...}.|
|00003730| 09 09 65 6f 66 20 3d 20 | 46 67 65 74 73 20 28 62 |..eof = |Fgets (b|
|00003740| 75 66 2c 20 42 55 46 5f | 4c 45 4e 2c 20 6d 61 69 |uf, BUF_|LEN, mai|
|00003750| 6c 5f 66 64 29 3b 0a 09 | 7d 20 77 68 69 6c 65 20 |l_fd);..|} while |
|00003760| 28 20 28 73 74 72 6e 63 | 6d 70 28 62 75 66 2c 22 |( (strnc|mp(buf,"|
|00003770| 46 72 6f 6d 20 22 2c 20 | 35 29 29 20 26 26 20 28 |From ", |5)) && (|
|00003780| 4e 55 4c 4c 20 21 3d 20 | 65 6f 66 29 20 29 3b 0a |NULL != |eof) );.|
|00003790| 0a 09 2f 2a 20 50 61 64 | 20 62 6c 6f 63 6b 20 61 |../* Pad| block a|
|000037a0| 73 20 6e 65 63 65 73 73 | 61 72 79 20 2a 2f 0a 09 |s necess|ary */..|
|000037b0| 6e 20 3d 20 6f 75 74 5f | 62 79 74 65 73 20 25 20 |n = out_|bytes % |
|000037c0| 31 32 38 3b 0a 09 66 6f | 72 20 28 3b 6e 3c 31 32 |128;..fo|r (;n<12|
|000037d0| 38 3b 6e 2b 2b 29 20 66 | 70 75 74 63 20 28 27 20 |8;n++) f|putc (' |
|000037e0| 27 2c 20 6d 73 67 5f 66 | 64 29 3b 0a 7d 0a 0a 00 |', msg_f|d);.}...|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003800| 6d 69 73 63 2e 63 00 00 | 00 00 00 00 00 00 00 00 |misc.c..|........|
|00003810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00003870| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00003880| 20 20 31 31 31 31 35 20 | 20 35 33 35 30 30 30 37 | 11115 | 5350007|
|00003890| 36 33 34 20 20 31 30 34 | 33 35 00 20 30 00 00 00 |634 104|35. 0...|
|000038a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003900| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00003910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003920| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a00| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00003a10| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 72 |h>.#incl|ude <str|
|00003a20| 69 6e 67 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |ing.h>.#|include |
|00003a30| 22 75 71 77 6b 2e 68 22 | 0a 0a 2f 2a 0a 20 2a 20 |"uqwk.h"|../*. * |
|00003a40| 20 4d 69 73 63 65 6c 6c | 61 6e 65 6f 75 73 20 75 | Miscell|aneous u|
|00003a50| 71 77 6b 20 72 6f 75 74 | 69 6e 65 73 0a 20 2a 2f |qwk rout|ines. */|
|00003a60| 0a 0a 4e 65 77 43 6f 6e | 66 65 72 65 6e 63 65 20 |..NewCon|ference |
|00003a70| 28 6e 61 6d 65 29 0a 63 | 68 61 72 20 2a 6e 61 6d |(name).c|har *nam|
|00003a80| 65 3b 0a 7b 0a 09 73 74 | 72 75 63 74 20 63 6f 6e |e;.{..st|ruct con|
|00003a90| 66 5f 65 6e 74 20 2a 63 | 70 2c 20 2a 74 6d 70 5f |f_ent *c|p, *tmp_|
|00003aa0| 63 70 3b 0a 09 63 68 61 | 72 20 2a 63 2c 20 6e 64 |cp;..cha|r *c, nd|
|00003ab0| 78 5f 66 6e 61 6d 65 5b | 50 41 54 48 5f 4c 45 4e |x_fname[|PATH_LEN|
|00003ac0| 5d 3b 0a 0a 09 2f 2a 20 | 47 65 74 20 73 70 61 63 |];.../* |Get spac|
|00003ad0| 65 20 66 6f 72 20 6e 65 | 77 20 63 6f 6e 66 65 72 |e for ne|w confer|
|00003ae0| 65 6e 63 65 20 2a 2f 0a | 09 69 66 20 28 4e 55 4c |ence */.|.if (NUL|
|00003af0| 4c 20 3d 3d 20 28 74 6d | 70 5f 63 70 20 3d 20 28 |L == (tm|p_cp = (|
|00003b00| 73 74 72 75 63 74 20 63 | 6f 6e 66 5f 65 6e 74 20 |struct c|onf_ent |
|00003b10| 2a 29 20 6d 61 6c 6c 6f | 63 0a 09 09 09 09 09 28 |*) mallo|c......(|
|00003b20| 73 69 7a 65 6f 66 20 28 | 73 74 72 75 63 74 20 63 |sizeof (|struct c|
|00003b30| 6f 6e 66 5f 65 6e 74 29 | 29 29 29 0a 09 7b 0a 09 |onf_ent)|)))..{..|
|00003b40| 09 66 70 72 69 6e 74 66 | 20 28 73 74 64 65 72 72 |.fprintf| (stderr|
|00003b50| 2c 20 22 25 73 3a 20 6f | 75 74 20 6f 66 20 6d 65 |, "%s: o|ut of me|
|00003b60| 6d 6f 72 79 5c 6e 22 2c | 20 70 72 6f 67 6e 61 6d |mory\n",| prognam|
|00003b70| 65 29 3b 0a 09 09 65 78 | 69 74 20 28 30 29 3b 0a |e);...ex|it (0);.|
|00003b80| 09 7d 0a 0a 09 2f 2a 20 | 47 65 74 20 73 70 61 63 |.}.../* |Get spac|
|00003b90| 65 20 66 6f 72 20 6e 61 | 6d 65 20 2a 2f 0a 09 69 |e for na|me */..i|
|00003ba0| 66 20 28 4e 55 4c 4c 20 | 3d 3d 20 28 63 20 3d 20 |f (NULL |== (c = |
|00003bb0| 28 63 68 61 72 20 2a 29 | 20 6d 61 6c 6c 6f 63 20 |(char *)| malloc |
|00003bc0| 28 31 2b 73 74 72 6c 65 | 6e 28 6e 61 6d 65 29 29 |(1+strle|n(name))|
|00003bd0| 29 29 0a 09 7b 0a 09 09 | 66 70 72 69 6e 74 66 20 |))..{...|fprintf |
|00003be0| 28 73 74 64 65 72 72 2c | 20 22 25 73 3a 20 6f 75 |(stderr,| "%s: ou|
|00003bf0| 74 20 6f 66 20 6d 65 6d | 6f 72 79 5c 6e 22 2c 20 |t of mem|ory\n", |
|00003c00| 70 72 6f 67 6e 61 6d 65 | 29 3b 0a 09 09 65 78 69 |progname|);...exi|
|00003c10| 74 20 28 30 29 3b 0a 09 | 7d 0a 0a 09 2f 2a 20 46 |t (0);..|}.../* F|
|00003c20| 69 6c 6c 20 69 6e 20 63 | 6f 6e 66 65 72 65 6e 63 |ill in c|onferenc|
|00003c30| 65 20 6e 61 6d 65 20 2a | 2f 0a 09 74 6d 70 5f 63 |e name *|/..tmp_c|
|00003c40| 70 2d 3e 6e 61 6d 65 20 | 3d 20 63 3b 0a 09 73 74 |p->name |= c;..st|
|00003c50| 72 63 70 79 20 28 74 6d | 70 5f 63 70 2d 3e 6e 61 |rcpy (tm|p_cp->na|
|00003c60| 6d 65 2c 20 6e 61 6d 65 | 29 3b 0a 0a 09 2f 2a 20 |me, name|);.../* |
|00003c70| 46 69 6c 6c 20 69 6e 20 | 63 6f 6e 66 65 72 65 6e |Fill in |conferen|
|00003c80| 63 65 20 6e 75 6d 62 65 | 72 20 2a 2f 0a 09 74 6d |ce numbe|r */..tm|
|00003c90| 70 5f 63 70 2d 3e 6e 75 | 6d 62 65 72 20 3d 20 63 |p_cp->nu|mber = c|
|00003ca0| 6f 6e 66 5f 63 6e 74 3b | 0a 0a 09 2f 2a 20 41 64 |onf_cnt;|.../* Ad|
|00003cb0| 64 20 74 6f 20 65 6e 64 | 20 6f 66 20 63 6f 6e 66 |d to end| of conf|
|00003cc0| 65 72 65 6e 63 65 20 6c | 69 73 74 20 2a 2f 0a 09 |erence l|ist */..|
|00003cd0| 69 66 20 28 6c 61 73 74 | 5f 63 6f 6e 66 20 3d 3d |if (last|_conf ==|
|00003ce0| 20 4e 55 4c 4c 29 0a 09 | 7b 0a 09 09 2f 2a 20 54 | NULL)..|{.../* T|
|00003cf0| 68 69 73 20 69 73 20 66 | 69 72 73 74 20 63 6f 6e |his is f|irst con|
|00003d00| 66 65 72 65 6e 63 65 20 | 2a 2f 0a 09 09 63 6f 6e |ference |*/...con|
|00003d10| 66 5f 6c 69 73 74 20 3d | 20 74 6d 70 5f 63 70 3b |f_list =| tmp_cp;|
|00003d20| 0a 09 7d 0a 09 65 6c 73 | 65 0a 09 7b 0a 09 09 6c |..}..els|e..{...l|
|00003d30| 61 73 74 5f 63 6f 6e 66 | 2d 3e 6e 65 78 74 20 3d |ast_conf|->next =|
|00003d40| 20 74 6d 70 5f 63 70 3b | 0a 09 7d 0a 09 74 6d 70 | tmp_cp;|..}..tmp|
|00003d50| 5f 63 70 2d 3e 6e 65 78 | 74 20 3d 20 4e 55 4c 4c |_cp->nex|t = NULL|
|00003d60| 3b 0a 09 6c 61 73 74 5f | 63 6f 6e 66 20 3d 20 74 |;..last_|conf = t|
|00003d70| 6d 70 5f 63 70 3b 0a 0a | 09 2f 2a 20 4f 70 65 6e |mp_cp;..|./* Open|
|00003d80| 20 6e 65 77 20 69 6e 64 | 65 78 20 66 69 6c 65 20 | new ind|ex file |
|00003d90| 2a 2f 0a 09 69 66 20 28 | 21 73 74 72 63 6d 70 20 |*/..if (|!strcmp |
|00003da0| 28 6e 61 6d 65 2c 20 4d | 41 49 4c 5f 43 4f 4e 46 |(name, M|AIL_CONF|
|00003db0| 5f 4e 41 4d 45 29 29 0a | 09 7b 0a 09 09 73 74 72 |_NAME)).|.{...str|
|00003dc0| 63 70 79 20 28 6e 64 78 | 5f 66 6e 61 6d 65 2c 20 |cpy (ndx|_fname, |
|00003dd0| 68 6f 6d 65 5f 64 69 72 | 29 3b 0a 09 09 73 74 72 |home_dir|);...str|
|00003de0| 63 61 74 20 28 6e 64 78 | 5f 66 6e 61 6d 65 2c 20 |cat (ndx|_fname, |
|00003df0| 22 2f 22 29 3b 0a 09 09 | 73 74 72 63 61 74 20 28 |"/");...|strcat (|
|00003e00| 6e 64 78 5f 66 6e 61 6d | 65 2c 20 22 70 65 72 73 |ndx_fnam|e, "pers|
|00003e10| 6f 6e 61 6c 2e 6e 64 78 | 22 29 3b 0a 09 7d 0a 09 |onal.ndx|");..}..|
|00003e20| 65 6c 73 65 0a 09 7b 0a | 09 09 73 70 72 69 6e 74 |else..{.|..sprint|
|00003e30| 66 20 28 6e 64 78 5f 66 | 6e 61 6d 65 2c 20 22 25 |f (ndx_f|name, "%|
|00003e40| 73 2f 25 30 33 64 2e 6e | 64 78 22 2c 20 68 6f 6d |s/%03d.n|dx", hom|
|00003e50| 65 5f 64 69 72 2c 20 63 | 6f 6e 66 5f 63 6e 74 29 |e_dir, c|onf_cnt)|
|00003e60| 3b 0a 09 7d 0a 0a 09 69 | 66 20 28 4e 55 4c 4c 20 |;..}...i|f (NULL |
|00003e70| 3d 3d 20 28 6e 64 78 5f | 66 64 20 3d 20 66 6f 70 |== (ndx_|fd = fop|
|00003e80| 65 6e 20 28 6e 64 78 5f | 66 6e 61 6d 65 2c 20 22 |en (ndx_|fname, "|
|00003e90| 77 22 29 29 29 0a 09 7b | 0a 09 09 66 70 72 69 6e |w")))..{|...fprin|
|00003ea0| 74 66 20 28 73 74 64 65 | 72 72 2c 20 22 25 73 3a |tf (stde|rr, "%s:|
|00003eb0| 20 63 61 6e 27 74 20 6f | 70 65 6e 20 25 73 5c 6e | can't o|pen %s\n|
|00003ec0| 22 2c 20 70 72 6f 67 6e | 61 6d 65 2c 20 6e 64 78 |", progn|ame, ndx|
|00003ed0| 5f 66 6e 61 6d 65 29 3b | 0a 09 09 65 78 69 74 20 |_fname);|...exit |
|00003ee0| 28 30 29 3b 0a 09 7d 0a | 0a 09 63 6f 6e 66 5f 63 |(0);..}.|..conf_c|
|00003ef0| 6e 74 2b 2b 3b 0a 7d 0a | 0a 50 61 64 53 74 72 69 |nt++;.}.|.PadStri|
|00003f00| 6e 67 20 28 73 2c 20 63 | 2c 20 6e 29 0a 63 68 61 |ng (s, c|, n).cha|
|00003f10| 72 20 2a 73 2c 20 2a 63 | 3b 0a 69 6e 74 20 6e 3b |r *s, *c|;.int n;|
|00003f20| 0a 2f 2a 0a 20 2a 20 20 | 54 61 6b 65 20 61 20 6e |./*. * |Take a n|
|00003f30| 75 6c 6c 2d 74 65 72 6d | 69 6e 61 74 65 64 20 73 |ull-term|inated s|
|00003f40| 74 72 69 6e 67 20 73 20 | 61 6e 64 20 63 6f 70 79 |tring s |and copy|
|00003f50| 20 69 74 2c 20 73 70 61 | 63 65 2d 70 61 64 64 65 | it, spa|ce-padde|
|00003f60| 64 20 6f 72 0a 20 2a 20 | 20 74 72 75 6e 63 61 74 |d or. * | truncat|
|00003f70| 65 64 20 69 66 20 6e 65 | 63 65 73 73 61 72 79 2c |ed if ne|cessary,|
|00003f80| 20 69 6e 74 6f 20 66 69 | 65 6c 64 20 63 20 6f 66 | into fi|eld c of|
|00003f90| 20 6e 20 63 68 61 72 61 | 63 74 65 72 73 0a 20 2a | n chara|cters. *|
|00003fa0| 2f 0a 7b 0a 09 69 6e 74 | 20 6c 65 6e 2c 20 69 3b |/.{..int| len, i;|
|00003fb0| 0a 09 6c 65 6e 20 3d 20 | 73 74 72 6c 65 6e 20 28 |..len = |strlen (|
|00003fc0| 73 29 3b 0a 09 69 66 20 | 28 6c 65 6e 20 3e 3d 20 |s);..if |(len >= |
|00003fd0| 6e 29 0a 09 7b 0a 09 09 | 73 74 72 6e 63 70 79 20 |n)..{...|strncpy |
|00003fe0| 28 63 2c 20 73 2c 20 6e | 29 3b 0a 09 7d 0a 09 65 |(c, s, n|);..}..e|
|00003ff0| 6c 73 65 0a 09 7b 0a 09 | 09 73 74 72 63 70 79 20 |lse..{..|.strcpy |
|00004000| 28 63 2c 20 73 29 3b 0a | 09 09 53 70 61 63 65 73 |(c, s);.|..Spaces|
|00004010| 20 28 26 63 5b 6c 65 6e | 5d 2c 20 6e 2d 6c 65 6e | (&c[len|], n-len|
|00004020| 29 3b 0a 09 7d 0a 7d 0a | 0a 53 70 61 63 65 73 20 |);..}.}.|.Spaces |
|00004030| 28 63 2c 20 6e 29 0a 63 | 68 61 72 20 2a 63 3b 0a |(c, n).c|har *c;.|
|00004040| 69 6e 74 20 6e 3b 0a 2f | 2a 0a 20 2a 20 20 46 69 |int n;./|*. * Fi|
|00004050| 6c 6c 20 66 69 65 6c 64 | 20 6f 66 20 6e 20 63 68 |ll field| of n ch|
|00004060| 61 72 61 63 74 65 72 73 | 20 77 69 74 68 20 73 70 |aracters| with sp|
|00004070| 61 63 65 73 0a 20 2a 2f | 0a 7b 0a 09 69 6e 74 20 |aces. */|.{..int |
|00004080| 69 3b 0a 09 66 6f 72 20 | 28 69 3d 30 3b 20 69 3c |i;..for |(i=0; i<|
|00004090| 6e 3b 20 69 2b 2b 29 20 | 63 5b 69 5d 3d 27 20 27 |n; i++) |c[i]=' '|
|000040a0| 3b 0a 7d 0a 0a 50 61 64 | 4e 75 6d 20 28 69 2c 20 |;.}..Pad|Num (i, |
|000040b0| 63 2c 20 6e 29 0a 69 6e | 74 20 69 2c 20 6e 3b 0a |c, n).in|t i, n;.|
|000040c0| 63 68 61 72 20 2a 63 3b | 0a 2f 2a 0a 20 2a 20 20 |char *c;|./*. * |
|000040d0| 46 6f 72 6d 61 74 20 61 | 6e 20 69 6e 74 65 67 65 |Format a|n intege|
|000040e0| 72 20 69 20 61 6e 64 20 | 70 6c 61 63 65 20 69 74 |r i and |place it|
|000040f0| 2c 20 73 70 61 63 65 20 | 66 69 6c 6c 65 64 2c 20 |, space |filled, |
|00004100| 69 6e 0a 20 2a 20 20 66 | 69 65 6c 64 20 63 20 6f |in. * f|ield c o|
|00004110| 66 20 6e 20 63 68 61 72 | 61 63 74 65 72 73 0a 20 |f n char|acters. |
|00004120| 2a 2f 0a 7b 0a 09 73 70 | 72 69 6e 74 66 20 28 62 |*/.{..sp|rintf (b|
|00004130| 75 66 2c 20 22 25 64 22 | 2c 20 69 29 3b 0a 09 50 |uf, "%d"|, i);..P|
|00004140| 61 64 53 74 72 69 6e 67 | 20 28 62 75 66 2c 20 63 |adString| (buf, c|
|00004150| 2c 20 6e 29 3b 0a 7d 0a | 0a 49 6e 74 4e 75 6d 20 |, n);.}.|.IntNum |
|00004160| 28 69 2c 20 63 29 0a 69 | 6e 74 20 69 3b 0a 63 68 |(i, c).i|nt i;.ch|
|00004170| 61 72 20 63 5b 32 5d 3b | 0a 2f 2a 0a 20 2a 20 20 |ar c[2];|./*. * |
|00004180| 50 75 74 20 62 69 6e 61 | 72 79 20 69 6e 74 65 67 |Put bina|ry integ|
|00004190| 65 72 20 69 20 69 6e 74 | 6f 20 74 77 6f 20 62 79 |er i int|o two by|
|000041a0| 74 65 73 0a 20 2a 2f 0a | 7b 0a 09 63 5b 30 5d 20 |tes. */.|{..c[0] |
|000041b0| 3d 20 69 20 25 20 32 35 | 36 3b 0a 09 63 5b 31 5d |= i % 25|6;..c[1]|
|000041c0| 20 3d 20 28 69 20 2f 20 | 32 35 36 29 20 25 20 32 | = (i / |256) % 2|
|000041d0| 35 36 3b 0a 7d 0a 0a 63 | 68 61 72 20 2a 46 67 65 |56;.}..c|har *Fge|
|000041e0| 74 73 20 28 63 2c 20 6e | 2c 20 66 64 29 0a 63 68 |ts (c, n|, fd).ch|
|000041f0| 61 72 20 2a 63 3b 0a 69 | 6e 74 20 6e 3b 0a 46 49 |ar *c;.i|nt n;.FI|
|00004200| 4c 45 20 2a 66 64 3b 0a | 2f 2a 0a 20 2a 20 20 53 |LE *fd;.|/*. * S|
|00004210| 61 6d 65 20 61 73 20 66 | 67 65 74 73 2c 20 62 75 |ame as f|gets, bu|
|00004220| 74 20 63 68 61 6e 67 65 | 73 20 74 72 61 69 6c 69 |t change|s traili|
|00004230| 6e 67 20 6c 69 6e 65 66 | 65 65 64 20 74 6f 20 61 |ng linef|eed to a|
|00004240| 20 6e 75 6c 6c 0a 20 2a | 2f 0a 7b 0a 09 69 6e 74 | null. *|/.{..int|
|00004250| 20 69 3b 0a 0a 09 69 66 | 20 28 4e 55 4c 4c 20 3d | i;...if| (NULL =|
|00004260| 3d 20 66 67 65 74 73 20 | 28 63 2c 20 6e 2c 20 66 |= fgets |(c, n, f|
|00004270| 64 29 29 20 72 65 74 75 | 72 6e 20 28 4e 55 4c 4c |d)) retu|rn (NULL|
|00004280| 29 3b 0a 09 69 20 3d 20 | 73 74 72 6c 65 6e 20 28 |);..i = |strlen (|
|00004290| 63 29 3b 0a 09 69 66 20 | 28 20 28 69 20 3e 20 30 |c);..if |( (i > 0|
|000042a0| 29 20 26 26 20 28 63 5b | 69 2d 31 5d 3d 3d 27 5c |) && (c[|i-1]=='\|
|000042b0| 6e 27 29 20 29 20 63 5b | 69 2d 31 5d 20 3d 20 30 |n') ) c[|i-1] = 0|
|000042c0| 3b 0a 0a 09 72 65 74 75 | 72 6e 20 28 63 29 3b 0a |;...retu|rn (c);.|
|000042d0| 7d 0a 0a 69 6e 74 74 6f | 6d 73 20 28 69 2c 20 63 |}..intto|ms (i, c|
|000042e0| 29 0a 69 6e 74 20 69 3b | 0a 63 68 61 72 20 63 5b |).int i;|.char c[|
|000042f0| 34 5d 3b 0a 2f 2a 0a 20 | 2a 20 20 43 6f 6e 76 65 |4];./*. |* Conve|
|00004300| 72 74 20 61 6e 20 69 6e | 74 65 67 65 72 20 69 6e |rt an in|teger in|
|00004310| 74 6f 20 74 68 65 20 4d | 69 63 72 6f 73 6f 66 74 |to the M|icrosoft|
|00004320| 20 42 61 73 69 63 20 66 | 6c 6f 61 74 69 6e 67 20 | Basic f|loating |
|00004330| 66 6f 72 6d 61 74 2e 0a | 20 2a 20 20 54 68 69 73 |format..| * This|
|00004340| 20 69 73 20 74 68 65 20 | 64 75 6d 62 65 73 74 20 | is the |dumbest |
|00004350| 74 68 69 6e 67 20 69 6e | 20 74 68 65 20 77 68 6f |thing in| the who|
|00004360| 6c 65 20 51 57 4b 20 73 | 74 61 6e 64 61 72 64 2e |le QWK s|tandard.|
|00004370| 20 20 57 68 79 20 69 6e | 0a 20 2a 20 20 74 68 65 | Why in|. * the|
|00004380| 20 77 6f 72 6c 64 20 73 | 74 6f 72 65 20 62 6c 6f | world s|tore blo|
|00004390| 63 6b 20 6f 66 66 73 65 | 74 73 20 61 73 20 66 6c |ck offse|ts as fl|
|000043a0| 6f 61 74 69 6e 67 20 70 | 6f 69 6e 74 20 6e 75 6d |oating p|oint num|
|000043b0| 62 65 72 73 3f 0a 20 2a | 20 20 53 74 75 70 69 64 |bers?. *| Stupid|
|000043c0| 21 0a 20 2a 2f 0a 7b 0a | 09 69 6e 74 20 6d 2c 20 |!. */.{.|.int m, |
|000043d0| 65 3b 0a 0a 09 69 66 20 | 28 69 20 3d 3d 20 30 29 |e;...if |(i == 0)|
|000043e0| 0a 09 7b 0a 09 09 63 5b | 30 5d 20 3d 20 63 5b 31 |..{...c[|0] = c[1|
|000043f0| 5d 20 3d 20 63 5b 32 5d | 20 3d 20 30 3b 0a 09 09 |] = c[2]| = 0;...|
|00004400| 63 5b 33 5d 20 3d 20 30 | 78 38 30 3b 0a 09 09 72 |c[3] = 0|x80;...r|
|00004410| 65 74 75 72 6e 3b 0a 09 | 7d 0a 0a 09 65 20 3d 20 |eturn;..|}...e = |
|00004420| 31 35 32 3b 0a 09 6d 20 | 3d 20 30 78 37 66 66 66 |152;..m |= 0x7fff|
|00004430| 66 66 20 26 20 69 3b 0a | 0a 09 77 68 69 6c 65 20 |ff & i;.|..while |
|00004440| 28 21 28 30 78 38 30 30 | 30 30 30 20 26 20 6d 29 |(!(0x800|000 & m)|
|00004450| 29 0a 09 7b 0a 09 09 6d | 20 3c 3c 3d 20 31 3b 0a |)..{...m| <<= 1;.|
|00004460| 09 09 65 2d 2d 3b 0a 09 | 7d 0a 09 63 5b 30 5d 20 |..e--;..|}..c[0] |
|00004470| 3d 20 30 78 66 66 20 26 | 20 6d 3b 0a 09 63 5b 31 |= 0xff &| m;..c[1|
|00004480| 5d 20 3d 20 30 78 66 66 | 20 26 20 28 6d 20 3e 3e |] = 0xff| & (m >>|
|00004490| 20 38 29 3b 0a 09 63 5b | 32 5d 20 3d 20 30 78 37 | 8);..c[|2] = 0x7|
|000044a0| 66 20 26 20 28 6d 20 3e | 3e 20 31 36 29 3b 0a 09 |f & (m >|> 16);..|
|000044b0| 63 5b 33 5d 20 3d 20 30 | 78 66 66 20 26 20 65 3b |c[3] = 0|xff & e;|
|000044c0| 0a 7d 0a 0a 69 6e 74 20 | 4c 61 73 74 49 6e 74 20 |.}..int |LastInt |
|000044d0| 28 6c 69 6e 65 29 0a 63 | 68 61 72 20 2a 6c 69 6e |(line).c|har *lin|
|000044e0| 65 3b 0a 2f 2a 0a 20 2a | 20 46 69 6e 64 20 6c 61 |e;./*. *| Find la|
|000044f0| 73 74 20 69 6e 74 65 67 | 65 72 20 6f 6e 20 6c 69 |st integ|er on li|
|00004500| 6e 65 0a 20 2a 2f 0a 7b | 0a 20 20 20 20 20 20 20 |ne. */.{|. |
|00004510| 20 69 6e 74 20 69 2c 20 | 6c 61 73 74 5f 64 65 6c | int i, |last_del|
|00004520| 69 6d 2c 20 6e 3b 0a 20 | 20 20 20 20 20 20 20 6e |im, n;. | n|
|00004530| 20 3d 20 73 74 72 6c 65 | 6e 20 28 6c 69 6e 65 29 | = strle|n (line)|
|00004540| 3b 0a 0a 20 20 20 20 20 | 20 20 20 2f 2a 20 46 69 |;.. | /* Fi|
|00004550| 6e 64 20 6c 61 73 74 20 | 64 65 6c 69 6d 69 74 65 |nd last |delimite|
|00004560| 72 20 2a 2f 0a 20 20 20 | 20 20 20 20 20 66 6f 72 |r */. | for|
|00004570| 20 28 69 3d 30 3b 20 69 | 3c 6e 3b 20 69 2b 2b 29 | (i=0; i|<n; i++)|
|00004580| 0a 20 20 20 20 20 20 20 | 20 7b 0a 20 20 20 20 20 |. | {. |
|00004590| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 20 | | if ( |
|000045a0| 28 6c 69 6e 65 5b 69 5d | 20 3d 3d 20 27 20 27 29 |(line[i]| == ' ')|
|000045b0| 20 7c 7c 20 28 6c 69 6e | 65 5b 69 5d 20 3d 3d 20 | || (lin|e[i] == |
|000045c0| 27 2d 27 29 20 7c 7c 0a | 20 20 20 20 20 20 20 20 |'-') ||.| |
|000045d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 6c 69 | | (li|
|000045e0| 6e 65 5b 69 5d 20 3d 3d | 20 27 2c 27 29 20 7c 7c |ne[i] ==| ',') |||
|000045f0| 20 28 6c 69 6e 65 5b 69 | 5d 20 3d 3d 20 27 3a 27 | (line[i|] == ':'|
|00004600| 29 20 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) ). | |
|00004610| 20 20 20 20 20 20 20 20 | 20 20 20 20 6c 61 73 74 | | last|
|00004620| 5f 64 65 6c 69 6d 20 3d | 20 69 3b 0a 20 20 20 20 |_delim =| i;. |
|00004630| 20 20 20 20 7d 0a 0a 20 | 20 20 20 20 20 20 20 69 | }.. | i|
|00004640| 20 3d 20 61 74 6f 69 20 | 28 26 6c 69 6e 65 5b 6c | = atoi |(&line[l|
|00004650| 61 73 74 5f 64 65 6c 69 | 6d 2b 31 5d 29 3b 0a 20 |ast_deli|m+1]);. |
|00004660| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 20 28 69 | r|eturn (i|
|00004670| 29 3b 0a 7d 0a 0a 50 61 | 72 73 65 44 61 74 65 20 |);.}..Pa|rseDate |
|00004680| 28 63 2c 20 68 70 29 0a | 63 68 61 72 20 2a 63 3b |(c, hp).|char *c;|
|00004690| 0a 73 74 72 75 63 74 20 | 71 77 6b 5f 68 64 72 20 |.struct |qwk_hdr |
|000046a0| 2a 68 70 3b 0a 7b 0a 20 | 20 20 20 20 20 20 20 63 |*hp;.{. | c|
|000046b0| 68 61 72 20 73 5b 50 41 | 54 48 5f 4c 45 4e 5d 3b |har s[PA|TH_LEN];|
|000046c0| 0a 20 20 20 20 20 20 20 | 20 69 6e 74 20 64 61 79 |. | int day|
|000046d0| 2c 20 6d 6f 6e 2c 20 79 | 65 61 72 2c 20 68 6f 75 |, mon, y|ear, hou|
|000046e0| 72 2c 20 6d 69 6e 75 74 | 65 3b 0a 20 20 20 20 20 |r, minut|e;. |
|000046f0| 20 20 20 63 68 61 72 20 | 6d 6f 6e 74 68 5b 34 5d | char |month[4]|
|00004700| 3b 0a 0a 20 20 20 20 20 | 20 20 20 2f 2a 20 44 61 |;.. | /* Da|
|00004710| 74 65 73 20 63 6f 6d 65 | 20 69 6e 20 74 77 6f 20 |tes come| in two |
|00004720| 66 6c 61 76 6f 72 73 3a | 20 20 77 69 74 68 20 74 |flavors:| with t|
|00004730| 68 65 20 77 65 65 6b 64 | 61 79 2c 20 61 6e 64 20 |he weekd|ay, and |
|00004740| 77 69 74 68 6f 75 74 2e | 0a 20 20 20 20 20 20 20 |without.|. |
|00004750| 20 20 20 20 77 65 20 73 | 69 6d 70 6c 79 20 6c 6f | we s|imply lo|
|00004760| 6f 6b 20 66 6f 72 20 74 | 68 65 20 63 6f 6d 6d 61 |ok for t|he comma|
|00004770| 20 77 68 69 63 68 20 66 | 6f 6c 6c 6f 77 73 20 74 | which f|ollows t|
|00004780| 68 65 20 77 65 65 6b 64 | 61 79 20 2a 2f 0a 20 20 |he weekd|ay */. |
|00004790| 20 20 20 20 20 20 69 66 | 20 28 63 5b 33 5d 20 3d | if| (c[3] =|
|000047a0| 3d 20 27 2c 27 29 0a 20 | 20 20 20 20 20 20 20 7b |= ','). | {|
|000047b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000047c0| 20 73 73 63 61 6e 66 20 | 28 26 63 5b 34 5d 2c 20 | sscanf |(&c[4], |
|000047d0| 22 25 64 20 25 73 20 25 | 64 20 25 64 3a 25 64 22 |"%d %s %|d %d:%d"|
|000047e0| 2c 20 26 64 61 79 2c 20 | 6d 6f 6e 74 68 2c 20 26 |, &day, |month, &|
|000047f0| 79 65 61 72 2c 0a 20 20 | 20 20 20 20 20 20 20 20 |year,. | |
|00004800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004820| 20 20 20 20 20 20 26 68 | 6f 75 72 2c 20 26 6d 69 | &h|our, &mi|
|00004830| 6e 75 74 65 29 3b 0a 20 | 20 20 20 20 20 20 20 7d |nute);. | }|
|00004840| 0a 20 20 20 20 20 20 20 | 20 65 6c 73 65 0a 20 20 |. | else. |
|00004850| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00004860| 20 20 20 20 20 20 20 20 | 73 73 63 61 6e 66 20 28 | |sscanf (|
|00004870| 63 2c 20 22 25 64 20 25 | 73 20 25 64 20 25 64 3a |c, "%d %|s %d %d:|
|00004880| 25 64 22 2c 20 26 64 61 | 79 2c 20 6d 6f 6e 74 68 |%d", &da|y, month|
|00004890| 2c 20 26 79 65 61 72 2c | 0a 20 20 20 20 20 20 20 |, &year,|. |
|000048a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 26 68 6f 75 72 2c 20 | | &hour, |
|000048d0| 26 6d 69 6e 75 74 65 29 | 3b 0a 20 20 20 20 20 20 |&minute)|;. |
|000048e0| 20 20 7d 0a 0a 20 20 20 | 20 20 20 20 20 2f 2a 20 | }.. | /* |
|000048f0| 43 6f 6e 76 65 72 74 20 | 61 6c 70 68 61 62 65 74 |Convert |alphabet|
|00004900| 69 63 20 6d 6f 6e 74 68 | 20 6e 61 6d 65 20 74 6f |ic month| name to|
|00004910| 20 69 6e 74 65 67 65 72 | 20 2a 2f 0a 20 20 20 20 | integer| */. |
|00004920| 20 20 20 20 69 66 20 28 | 21 73 74 72 6e 63 6d 70 | if (|!strncmp|
|00004930| 20 28 6d 6f 6e 74 68 2c | 20 22 4a 61 6e 22 2c 20 | (month,| "Jan", |
|00004940| 33 29 29 20 6d 6f 6e 20 | 3d 20 31 3b 0a 20 20 20 |3)) mon |= 1;. |
|00004950| 20 20 20 20 20 69 66 20 | 28 21 73 74 72 6e 63 6d | if |(!strncm|
|00004960| 70 20 28 6d 6f 6e 74 68 | 2c 20 22 46 65 62 22 2c |p (month|, "Feb",|
|00004970| 20 33 29 29 20 6d 6f 6e | 20 3d 20 32 3b 0a 20 20 | 3)) mon| = 2;. |
|00004980| 20 20 20 20 20 20 69 66 | 20 28 21 73 74 72 6e 63 | if| (!strnc|
|00004990| 6d 70 20 28 6d 6f 6e 74 | 68 2c 20 22 4d 61 72 22 |mp (mont|h, "Mar"|
|000049a0| 2c 20 33 29 29 20 6d 6f | 6e 20 3d 20 33 3b 0a 20 |, 3)) mo|n = 3;. |
|000049b0| 20 20 20 20 20 20 20 69 | 66 20 28 21 73 74 72 6e | i|f (!strn|
|000049c0| 63 6d 70 20 28 6d 6f 6e | 74 68 2c 20 22 41 70 72 |cmp (mon|th, "Apr|
|000049d0| 22 2c 20 33 29 29 20 6d | 6f 6e 20 3d 20 34 3b 0a |", 3)) m|on = 4;.|
|000049e0| 20 20 20 20 20 20 20 20 | 69 66 20 28 21 73 74 72 | |if (!str|
|000049f0| 6e 63 6d 70 20 28 6d 6f | 6e 74 68 2c 20 22 4d 61 |ncmp (mo|nth, "Ma|
|00004a00| 79 22 2c 20 33 29 29 20 | 6d 6f 6e 20 3d 20 35 3b |y", 3)) |mon = 5;|
|00004a10| 0a 20 20 20 20 20 20 20 | 20 69 66 20 28 21 73 74 |. | if (!st|
|00004a20| 72 6e 63 6d 70 20 28 6d | 6f 6e 74 68 2c 20 22 4a |rncmp (m|onth, "J|
|00004a30| 75 6e 22 2c 20 33 29 29 | 20 6d 6f 6e 20 3d 20 36 |un", 3))| mon = 6|
|00004a40| 3b 0a 20 20 20 20 20 20 | 20 20 69 66 20 28 21 73 |;. | if (!s|
|00004a50| 74 72 6e 63 6d 70 20 28 | 6d 6f 6e 74 68 2c 20 22 |trncmp (|month, "|
|00004a60| 4a 75 6c 22 2c 20 33 29 | 29 20 6d 6f 6e 20 3d 20 |Jul", 3)|) mon = |
|00004a70| 37 3b 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 21 |7;. | if (!|
|00004a80| 73 74 72 6e 63 6d 70 20 | 28 6d 6f 6e 74 68 2c 20 |strncmp |(month, |
|00004a90| 22 41 75 67 22 2c 20 33 | 29 29 20 6d 6f 6e 20 3d |"Aug", 3|)) mon =|
|00004aa0| 20 38 3b 0a 20 20 20 20 | 20 20 20 20 69 66 20 28 | 8;. | if (|
|00004ab0| 21 73 74 72 6e 63 6d 70 | 20 28 6d 6f 6e 74 68 2c |!strncmp| (month,|
|00004ac0| 20 22 53 65 70 22 2c 20 | 33 29 29 20 6d 6f 6e 20 | "Sep", |3)) mon |
|00004ad0| 3d 20 39 3b 0a 20 20 20 | 20 20 20 20 20 69 66 20 |= 9;. | if |
|00004ae0| 28 21 73 74 72 6e 63 6d | 70 20 28 6d 6f 6e 74 68 |(!strncm|p (month|
|00004af0| 2c 20 22 4f 63 74 22 2c | 20 33 29 29 20 6d 6f 6e |, "Oct",| 3)) mon|
|00004b00| 20 3d 20 31 30 3b 0a 20 | 20 20 20 20 20 20 20 69 | = 10;. | i|
|00004b10| 66 20 28 21 73 74 72 6e | 63 6d 70 20 28 6d 6f 6e |f (!strn|cmp (mon|
|00004b20| 74 68 2c 20 22 4e 6f 76 | 22 2c 20 33 29 29 20 6d |th, "Nov|", 3)) m|
|00004b30| 6f 6e 20 3d 20 31 31 3b | 0a 20 20 20 20 20 20 20 |on = 11;|. |
|00004b40| 20 69 66 20 28 21 73 74 | 72 6e 63 6d 70 20 28 6d | if (!st|rncmp (m|
|00004b50| 6f 6e 74 68 2c 20 22 44 | 65 63 22 2c 20 33 29 29 |onth, "D|ec", 3))|
|00004b60| 20 6d 6f 6e 20 3d 20 31 | 32 3b 0a 0a 20 20 20 20 | mon = 1|2;.. |
|00004b70| 20 20 20 20 2f 2a 20 43 | 6f 6e 76 65 72 74 20 64 | /* C|onvert d|
|00004b80| 61 74 65 20 2a 2f 0a 20 | 20 20 20 20 20 20 20 73 |ate */. | s|
|00004b90| 70 72 69 6e 74 66 20 28 | 73 2c 20 22 25 30 32 64 |printf (|s, "%02d|
|00004ba0| 2d 25 30 32 64 2d 25 30 | 32 64 22 2c 20 6d 6f 6e |-%02d-%0|2d", mon|
|00004bb0| 2c 20 64 61 79 2c 20 79 | 65 61 72 29 3b 0a 20 20 |, day, y|ear);. |
|00004bc0| 20 20 20 20 20 20 50 61 | 64 53 74 72 69 6e 67 20 | Pa|dString |
|00004bd0| 28 73 2c 20 68 70 2d 3e | 64 61 74 65 2c 20 38 29 |(s, hp->|date, 8)|
|00004be0| 3b 0a 0a 20 20 20 20 20 | 20 20 20 2f 2a 20 54 69 |;.. | /* Ti|
|00004bf0| 6d 65 20 2a 2f 0a 20 20 | 20 20 20 20 20 20 73 70 |me */. | sp|
|00004c00| 72 69 6e 74 66 20 28 73 | 2c 20 22 25 30 32 64 3a |rintf (s|, "%02d:|
|00004c10| 25 30 32 64 22 2c 20 68 | 6f 75 72 2c 20 6d 69 6e |%02d", h|our, min|
|00004c20| 75 74 65 29 3b 0a 20 20 | 20 20 20 20 20 20 50 61 |ute);. | Pa|
|00004c30| 64 53 74 72 69 6e 67 20 | 28 73 2c 20 68 70 2d 3e |dString |(s, hp->|
|00004c40| 74 69 6d 65 2c 20 35 29 | 3b 0a 7d 0a 0a 00 00 00 |time, 5)|;.}.....|
|00004c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e00| 6e 65 77 73 2e 63 00 00 | 00 00 00 00 00 00 00 00 |news.c..|........|
|00004e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 31 |.... 6|44 . 1|
|00004e70| 35 30 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |50 . 1|44 . |
|00004e80| 20 20 31 34 32 32 36 20 | 20 35 33 35 30 30 30 37 | 14226 | 5350007|
|00004e90| 36 33 34 20 20 31 30 34 | 36 34 00 20 30 00 00 00 |634 104|64. 0...|
|00004ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f00| 00 75 73 74 61 72 20 20 | 00 6d 6c 6f 65 77 65 6e |.ustar |.mloewen|
|00004f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 76 6d 00 00 00 00 00 |........|.vm.....|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005000| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00005010| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00005020| 2f 74 79 70 65 73 2e 68 | 3e 0a 23 69 6e 63 6c 75 |/types.h|>.#inclu|
|00005030| 64 65 20 3c 73 79 73 2f | 73 74 61 74 2e 68 3e 0a |de <sys/|stat.h>.|
|00005040| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 72 69 6e 67 |#include| <string|
|00005050| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 22 75 71 |.h>.#inc|lude "uq|
|00005060| 77 6b 2e 68 22 0a 2f 2a | 0a 20 2a 20 20 41 6c 6c |wk.h"./*|. * All|
|00005070| 20 73 6f 72 74 73 20 6f | 66 20 73 74 75 66 66 20 | sorts o|f stuff |
|00005080| 74 6f 20 64 6f 20 6e 65 | 77 73 20 70 72 6f 63 65 |to do ne|ws proce|
|00005090| 73 73 69 6e 67 0a 20 2a | 2f 0a 0a 44 6f 4e 65 77 |ssing. *|/..DoNew|
|000050a0| 73 20 28 29 0a 2f 2a 0a | 20 2a 20 20 43 6f 6c 6c |s ()./*.| * Coll|
|000050b0| 65 63 74 20 75 6e 72 65 | 61 64 20 6e 65 77 73 20 |ect unre|ad news |
|000050c0| 69 6e 74 6f 20 51 57 4b | 20 70 61 63 6b 65 74 0a |into QWK| packet.|
|000050d0| 20 2a 2f 0a 7b 0a 09 73 | 74 72 75 63 74 20 61 63 | */.{..s|truct ac|
|000050e0| 74 5f 65 6e 74 20 2a 61 | 70 3b 0a 09 73 74 72 75 |t_ent *a|p;..stru|
|000050f0| 63 74 20 6e 72 63 5f 65 | 6e 74 20 2a 6e 70 3b 0a |ct nrc_e|nt *np;.|
|00005100| 0a 09 2f 2a 20 52 65 61 | 64 20 2e 6e 65 77 73 72 |../* Rea|d .newsr|
|00005110| 63 20 66 69 6c 65 20 2a | 2f 0a 09 69 66 20 28 21 |c file *|/..if (!|
|00005120| 52 65 61 64 4e 65 77 73 | 72 63 28 29 29 20 72 65 |ReadNews|rc()) re|
|00005130| 74 75 72 6e 20 28 30 29 | 3b 0a 0a 09 2f 2a 20 41 |turn (0)|;.../* A|
|00005140| 6e 64 20 61 63 74 69 76 | 65 20 66 69 6c 65 20 2a |nd activ|e file *|
|00005150| 2f 0a 09 69 66 20 28 21 | 52 65 61 64 41 63 74 69 |/..if (!|ReadActi|
|00005160| 76 65 28 29 29 20 72 65 | 74 75 72 6e 20 28 30 29 |ve()) re|turn (0)|
|00005170| 3b 0a 0a 09 2f 2a 20 4c | 6f 6f 6b 20 74 68 72 6f |;.../* L|ook thro|
|00005180| 75 67 68 20 74 68 65 20 | 6e 65 77 73 72 63 20 66 |ugh the |newsrc f|
|00005190| 69 6c 65 20 2a 2f 0a 09 | 6e 70 20 3d 20 6e 72 63 |ile */..|np = nrc|
|000051a0| 5f 6c 69 73 74 3b 0a 09 | 77 68 69 6c 65 20 28 6e |_list;..|while (n|
|000051b0| 70 20 21 3d 20 4e 55 4c | 4c 29 0a 09 7b 0a 09 09 |p != NUL|L)..{...|
|000051c0| 2f 2a 20 43 68 65 63 6b | 20 69 66 20 74 6f 6f 20 |/* Check| if too |
|000051d0| 6d 61 6e 79 20 62 6c 6f | 63 6b 73 20 61 6c 72 65 |many blo|cks alre|
|000051e0| 61 64 79 20 2a 2f 0a 09 | 09 69 66 20 28 20 28 62 |ady */..|.if ( (b|
|000051f0| 6c 6b 5f 63 6e 74 20 3e | 3d 20 6d 61 78 5f 62 6c |lk_cnt >|= max_bl|
|00005200| 6b 73 29 20 26 26 20 28 | 6d 61 78 5f 62 6c 6b 73 |ks) && (|max_blks|
|00005210| 20 3e 20 30 29 20 29 0a | 09 09 7b 0a 09 09 09 72 | > 0) ).|..{....r|
|00005220| 65 74 75 72 6e 20 28 30 | 29 3b 0a 09 09 7d 0a 0a |eturn (0|);...}..|
|00005230| 09 09 69 66 20 28 20 28 | 6e 70 2d 3e 73 75 62 73 |..if ( (|np->subs|
|00005240| 63 72 69 62 65 64 29 20 | 26 26 0a 09 09 20 20 20 |cribed) |&&... |
|00005250| 20 20 28 4e 55 4c 4c 20 | 21 3d 20 28 61 70 20 3d | (NULL |!= (ap =|
|00005260| 20 46 69 6e 64 41 63 74 | 69 76 65 20 28 6e 70 2d | FindAct|ive (np-|
|00005270| 3e 6e 61 6d 65 29 29 29 | 20 29 0a 09 09 7b 0a 09 |>name)))| )...{..|
|00005280| 09 09 2f 2a 20 44 6f 20 | 74 68 69 73 20 67 72 6f |../* Do |this gro|
|00005290| 75 70 20 2a 2f 0a 09 09 | 09 44 6f 47 72 6f 75 70 |up */...|.DoGroup|
|000052a0| 20 28 6e 70 2c 20 61 70 | 29 3b 0a 09 09 7d 0a 09 | (np, ap|);...}..|
|000052b0| 09 6e 70 20 3d 20 6e 70 | 2d 3e 6e 65 78 74 3b 0a |.np = np|->next;.|
|000052c0| 09 7d 0a 7d 0a 0a 69 6e | 74 20 52 65 61 64 4e 65 |.}.}..in|t ReadNe|
|000052d0| 77 73 72 63 28 29 0a 2f | 2a 0a 20 2a 20 20 52 65 |wsrc()./|*. * Re|
|000052e0| 61 64 20 74 68 65 20 2e | 6e 65 77 73 72 63 20 66 |ad the .|newsrc f|
|000052f0| 69 6c 65 0a 20 2a 2f 0a | 7b 0a 09 63 68 61 72 20 |ile. */.|{..char |
|00005300| 67 72 6f 75 70 5f 6e 61 | 6d 65 5b 50 41 54 48 5f |group_na|me[PATH_|
|00005310| 4c 45 4e 5d 3b 0a 09 73 | 74 72 75 63 74 20 6e 72 |LEN];..s|truct nr|
|00005320| 63 5f 65 6e 74 20 2a 6e | 70 3b 0a 09 69 6e 74 20 |c_ent *n|p;..int |
|00005330| 6e 2c 20 63 3b 0a 0a 09 | 2f 2a 20 44 6f 6e 27 74 |n, c;...|/* Don't|
|00005340| 20 62 6f 74 68 65 72 20 | 69 66 20 77 65 27 76 65 | bother |if we've|
|00005350| 20 61 6c 72 65 61 64 20 | 72 65 61 64 20 69 74 20 | alread |read it |
|00005360| 2a 2f 0a 09 69 66 20 28 | 6e 72 63 5f 6c 69 73 74 |*/..if (|nrc_list|
|00005370| 20 21 3d 20 4e 55 4c 4c | 29 20 72 65 74 75 72 6e | != NULL|) return|
|00005380| 20 28 31 29 3b 0a 0a 09 | 2f 2a 20 4f 70 65 6e 20 | (1);...|/* Open |
|00005390| 69 74 20 2a 2f 0a 09 69 | 66 20 28 4e 55 4c 4c 20 |it */..i|f (NULL |
|000053a0| 3d 3d 20 28 6e 72 63 5f | 66 64 20 3d 20 66 6f 70 |== (nrc_|fd = fop|
|000053b0| 65 6e 20 28 6e 72 63 5f | 66 69 6c 65 2c 20 22 72 |en (nrc_|file, "r|
|000053c0| 22 29 29 29 0a 09 7b 0a | 09 09 66 70 72 69 6e 74 |")))..{.|..fprint|
|000053d0| 66 20 28 73 74 64 65 72 | 72 2c 20 22 25 73 3a 20 |f (stder|r, "%s: |
|000053e0| 63 61 6e 27 74 20 6f 70 | 65 6e 20 25 73 5c 6e 22 |can't op|en %s\n"|
|000053f0| 2c 20 70 72 6f 67 6e 61 | 6d 65 2c 20 6e 72 63 5f |, progna|me, nrc_|
|00005400| 66 69 6c 65 29 3b 0a 09 | 09 72 65 74 75 72 6e 20 |file);..|.return |
|00005410| 28 30 29 3b 0a 09 7d 0a | 0a 09 2f 2a 20 52 65 61 |(0);..}.|../* Rea|
|00005420| 64 20 74 68 72 6f 75 67 | 68 20 2a 2f 0a 09 77 68 |d throug|h */..wh|
|00005430| 69 6c 65 20 28 4e 55 4c | 4c 20 21 3d 20 46 67 65 |ile (NUL|L != Fge|
|00005440| 74 73 20 28 62 75 66 2c | 20 42 55 46 5f 4c 45 4e |ts (buf,| BUF_LEN|
|00005450| 2c 20 6e 72 63 5f 66 64 | 29 29 0a 09 7b 0a 09 09 |, nrc_fd|))..{...|
|00005460| 2f 2a 20 41 6c 6c 6f 63 | 61 74 65 20 61 20 6e 65 |/* Alloc|ate a ne|
|00005470| 77 20 6e 72 63 20 65 6e | 74 72 79 20 2a 2f 0a 09 |w nrc en|try */..|
|00005480| 09 6e 70 20 3d 20 28 73 | 74 72 75 63 74 20 6e 72 |.np = (s|truct nr|
|00005490| 63 5f 65 6e 74 20 2a 29 | 20 6d 61 6c 6c 6f 63 20 |c_ent *)| malloc |
|000054a0| 28 73 69 7a 65 6f 66 20 | 28 73 74 72 75 63 74 20 |(sizeof |(struct |
|000054b0| 6e 72 63 5f 65 6e 74 29 | 29 3b 0a 09 09 69 66 20 |nrc_ent)|);...if |
|000054c0| 28 6e 70 20 3d 3d 20 4e | 55 4c 4c 29 20 4f 75 74 |(np == N|ULL) Out|
|000054d0| 4f 66 4d 65 6d 6f 72 79 | 28 29 3b 0a 0a 09 09 2f |OfMemory|();..../|
|000054e0| 2a 20 50 61 72 73 65 20 | 67 72 6f 75 70 20 6e 61 |* Parse |group na|
|000054f0| 6d 65 20 2a 2f 0a 09 09 | 73 73 63 61 6e 66 20 28 |me */...|sscanf (|
|00005500| 62 75 66 2c 20 22 25 73 | 22 2c 20 67 72 6f 75 70 |buf, "%s|", group|
|00005510| 5f 6e 61 6d 65 29 3b 0a | 09 09 6e 20 3d 20 73 74 |_name);.|..n = st|
|00005520| 72 6c 65 6e 20 28 67 72 | 6f 75 70 5f 6e 61 6d 65 |rlen (gr|oup_name|
|00005530| 29 3b 0a 0a 09 09 69 66 | 20 28 67 72 6f 75 70 5f |);....if| (group_|
|00005540| 6e 61 6d 65 5b 6e 2d 31 | 5d 20 3d 3d 20 27 3a 27 |name[n-1|] == ':'|
|00005550| 29 0a 09 09 7b 0a 09 09 | 09 6e 70 2d 3e 73 75 62 |)...{...|.np->sub|
|00005560| 73 63 72 69 62 65 64 20 | 3d 20 31 3b 0a 09 09 7d |scribed |= 1;...}|
|00005570| 0a 09 09 65 6c 73 65 0a | 09 09 7b 0a 09 09 09 6e |...else.|..{....n|
|00005580| 70 2d 3e 73 75 62 73 63 | 72 69 62 65 64 20 3d 20 |p->subsc|ribed = |
|00005590| 30 3b 0a 09 09 7d 0a 0a | 09 09 67 72 6f 75 70 5f |0;...}..|..group_|
|000055a0| 6e 61 6d 65 5b 6e 2d 31 | 5d 20 3d 20 30 3b 0a 09 |name[n-1|] = 0;..|
|000055b0| 09 6e 70 2d 3e 6e 61 6d | 65 20 3d 20 28 63 68 61 |.np->nam|e = (cha|
|000055c0| 72 20 2a 29 20 6d 61 6c | 6c 6f 63 20 28 6e 29 3b |r *) mal|loc (n);|
|000055d0| 0a 09 09 69 66 20 28 6e | 70 2d 3e 6e 61 6d 65 20 |...if (n|p->name |
|000055e0| 3d 3d 20 4e 55 4c 4c 29 | 20 4f 75 74 4f 66 4d 65 |== NULL)| OutOfMe|
|000055f0| 6d 6f 72 79 28 29 3b 0a | 09 09 73 74 72 63 70 79 |mory();.|..strcpy|
|00005600| 20 28 6e 70 2d 3e 6e 61 | 6d 65 2c 20 67 72 6f 75 | (np->na|me, grou|
|00005610| 70 5f 6e 61 6d 65 29 3b | 0a 0a 09 09 2f 2a 20 48 |p_name);|..../* H|
|00005620| 69 20 61 72 74 69 63 6c | 65 20 6e 75 6d 62 65 72 |i articl|e number|
|00005630| 20 2a 2f 0a 09 09 6e 70 | 2d 3e 68 69 20 3d 20 4c | */...np|->hi = L|
|00005640| 61 73 74 49 6e 74 20 28 | 62 75 66 29 3b 0a 0a 09 |astInt (|buf);...|
|00005650| 09 2f 2a 20 41 64 64 20 | 74 6f 20 6e 72 63 20 6c |./* Add |to nrc l|
|00005660| 69 73 74 20 2a 2f 0a 09 | 09 6e 70 2d 3e 6e 65 78 |ist */..|.np->nex|
|00005670| 74 20 3d 20 6e 72 63 5f | 6c 69 73 74 3b 0a 09 09 |t = nrc_|list;...|
|00005680| 6e 72 63 5f 6c 69 73 74 | 20 3d 20 6e 70 3b 0a 09 |nrc_list| = np;..|
|00005690| 7d 0a 0a 09 2f 2a 20 57 | 61 6c 6b 20 74 68 72 6f |}.../* W|alk thro|
|000056a0| 75 67 68 20 74 68 65 20 | 6e 72 63 20 6c 69 73 74 |ugh the |nrc list|
|000056b0| 2c 20 61 73 73 69 67 6e | 20 63 6f 6e 66 65 72 65 |, assign| confere|
|000056c0| 6e 63 65 20 6e 75 6d 62 | 65 72 73 20 2a 2f 0a 09 |nce numb|ers */..|
|000056d0| 6e 70 20 3d 20 6e 72 63 | 5f 6c 69 73 74 3b 0a 09 |np = nrc|_list;..|
|000056e0| 63 20 3d 20 30 3b 0a 09 | 77 68 69 6c 65 20 28 6e |c = 0;..|while (n|
|000056f0| 70 20 21 3d 20 4e 55 4c | 4c 29 0a 09 7b 0a 09 09 |p != NUL|L)..{...|
|00005700| 6e 70 2d 3e 63 6f 6e 66 | 20 3d 20 63 3b 0a 09 09 |np->conf| = c;...|
|00005710| 63 2b 2b 3b 0a 09 09 6e | 70 20 3d 20 6e 70 2d 3e |c++;...n|p = np->|
|00005720| 6e 65 78 74 3b 0a 09 7d | 0a 0a 09 66 63 6c 6f 73 |next;..}|...fclos|
|00005730| 65 20 28 6e 72 63 5f 66 | 64 29 3b 0a 09 72 65 74 |e (nrc_f|d);..ret|
|00005740| 75 72 6e 20 28 31 29 3b | 0a 7d 0a 0a 69 6e 74 20 |urn (1);|.}..int |
|00005750| 52 65 61 64 41 63 74 69 | 76 65 28 29 0a 2f 2a 0a |ReadActi|ve()./*.|
|00005760| 20 2a 20 20 52 65 61 64 | 20 61 63 74 69 76 65 20 | * Read| active |
|00005770| 66 69 6c 65 0a 20 2a 2f | 0a 7b 0a 09 63 68 61 72 |file. */|.{..char|
|00005780| 20 67 72 6f 75 70 5f 6e | 61 6d 65 5b 50 41 54 48 | group_n|ame[PATH|
|00005790| 5f 4c 45 4e 5d 3b 0a 09 | 73 74 72 75 63 74 20 61 |_LEN];..|struct a|
|000057a0| 63 74 5f 65 6e 74 20 2a | 61 70 3b 0a 09 69 6e 74 |ct_ent *|ap;..int|
|000057b0| 20 6e 3b 0a 0a 09 2f 2a | 20 44 6f 6e 27 74 20 62 | n;.../*| Don't b|
|000057c0| 6f 74 68 65 72 20 69 66 | 20 69 74 27 73 20 61 6c |other if| it's al|
|000057d0| 72 65 61 64 79 20 68 65 | 72 65 20 2a 2f 0a 09 69 |ready he|re */..i|
|000057e0| 66 20 28 61 63 74 5f 6c | 69 73 74 20 21 3d 20 4e |f (act_l|ist != N|
|000057f0| 55 4c 4c 29 20 72 65 74 | 75 72 6e 20 28 31 29 3b |ULL) ret|urn (1);|
|00005800| 0a 0a 09 2f 2a 20 4f 70 | 65 6e 20 74 68 65 20 61 |.../* Op|en the a|
|00005810| 63 74 69 76 65 20 66 69 | 6c 65 20 2a 2f 0a 09 69 |ctive fi|le */..i|
|00005820| 66 20 28 4e 55 4c 4c 20 | 3d 3d 20 28 61 63 74 5f |f (NULL |== (act_|
|00005830| 66 64 20 3d 20 66 6f 70 | 65 6e 20 28 61 63 74 5f |fd = fop|en (act_|
|00005840| 66 69 6c 65 2c 20 22 72 | 22 29 29 29 0a 09 7b 0a |file, "r|")))..{.|
|00005850| 09 09 66 70 72 69 6e 74 | 66 20 28 73 74 64 65 72 |..fprint|f (stder|
|00005860| 72 2c 20 22 25 73 3a 20 | 63 61 6e 27 74 20 6f 70 |r, "%s: |can't op|
|00005870| 65 6e 20 25 73 5c 6e 22 | 2c 20 70 72 6f 67 6e 61 |en %s\n"|, progna|
|00005880| 6d 65 2c 20 61 63 74 5f | 66 69 6c 65 29 3b 0a 09 |me, act_|file);..|
|00005890| 09 72 65 74 75 72 6e 20 | 28 30 29 3b 0a 09 7d 0a |.return |(0);..}.|
|000058a0| 0a 09 2f 2a 20 52 65 61 | 64 20 74 68 72 6f 75 67 |../* Rea|d throug|
|000058b0| 68 20 69 74 20 2a 2f 0a | 09 77 68 69 6c 65 20 28 |h it */.|.while (|
|000058c0| 4e 55 4c 4c 20 21 3d 20 | 46 67 65 74 73 20 28 62 |NULL != |Fgets (b|
|000058d0| 75 66 2c 20 42 55 46 5f | 4c 45 4e 2c 20 61 63 74 |uf, BUF_|LEN, act|
|000058e0| 5f 66 64 29 29 0a 09 7b | 0a 09 09 2f 2a 20 47 65 |_fd))..{|.../* Ge|
|000058f0| 74 20 6e 65 77 20 61 63 | 74 20 65 6e 74 72 79 20 |t new ac|t entry |
|00005900| 2a 2f 0a 09 09 61 70 20 | 3d 20 28 73 74 72 75 63 |*/...ap |= (struc|
|00005910| 74 20 61 63 74 5f 65 6e | 74 20 2a 29 20 6d 61 6c |t act_en|t *) mal|
|00005920| 6c 6f 63 20 28 73 69 7a | 65 6f 66 20 28 73 74 72 |loc (siz|eof (str|
|00005930| 75 63 74 20 61 63 74 5f | 65 6e 74 29 29 3b 0a 09 |uct act_|ent));..|
|00005940| 09 69 66 20 28 61 70 20 | 3d 3d 20 4e 55 4c 4c 29 |.if (ap |== NULL)|
|00005950| 20 4f 75 74 4f 66 4d 65 | 6d 6f 72 79 28 29 3b 0a | OutOfMe|mory();.|
|00005960| 0a 09 09 2f 2a 20 50 61 | 72 73 65 20 6e 61 6d 65 |.../* Pa|rse name|
|00005970| 2c 20 6d 65 73 73 61 67 | 65 20 6e 75 6d 62 65 72 |, messag|e number|
|00005980| 73 20 2a 2f 0a 09 09 73 | 73 63 61 6e 66 20 28 62 |s */...s|scanf (b|
|00005990| 75 66 2c 20 22 25 73 20 | 25 64 20 25 64 22 2c 20 |uf, "%s |%d %d", |
|000059a0| 67 72 6f 75 70 5f 6e 61 | 6d 65 2c 20 26 61 70 2d |group_na|me, &ap-|
|000059b0| 3e 68 69 2c 20 26 61 70 | 2d 3e 6c 6f 29 3b 0a 09 |>hi, &ap|->lo);..|
|000059c0| 09 61 70 2d 3e 6e 61 6d | 65 20 3d 20 28 63 68 61 |.ap->nam|e = (cha|
|000059d0| 72 20 2a 29 20 6d 61 6c | 6c 6f 63 20 28 31 2b 73 |r *) mal|loc (1+s|
|000059e0| 74 72 6c 65 6e 28 67 72 | 6f 75 70 5f 6e 61 6d 65 |trlen(gr|oup_name|
|000059f0| 29 29 3b 0a 09 09 69 66 | 20 28 61 70 2d 3e 6e 61 |));...if| (ap->na|
|00005a00| 6d 65 20 3d 3d 20 4e 55 | 4c 4c 29 20 4f 75 74 4f |me == NU|LL) OutO|
|00005a10| 66 4d 65 6d 6f 72 79 28 | 29 3b 0a 09 09 73 74 72 |fMemory(|);...str|
|00005a20| 63 70 79 20 28 61 70 2d | 3e 6e 61 6d 65 2c 20 67 |cpy (ap-|>name, g|
|00005a30| 72 6f 75 70 5f 6e 61 6d | 65 29 3b 0a 0a 09 09 2f |roup_nam|e);..../|
|00005a40| 2a 20 41 64 64 20 74 6f | 20 6c 69 73 74 20 2a 2f |* Add to| list */|
|00005a50| 0a 09 09 61 70 2d 3e 6e | 65 78 74 20 3d 20 61 63 |...ap->n|ext = ac|
|00005a60| 74 5f 6c 69 73 74 3b 0a | 09 09 61 63 74 5f 6c 69 |t_list;.|..act_li|
|00005a70| 73 74 20 3d 20 61 70 3b | 0a 09 7d 0a 0a 09 66 63 |st = ap;|..}...fc|
|00005a80| 6c 6f 73 65 20 28 61 63 | 74 5f 66 64 29 3b 0a 09 |lose (ac|t_fd);..|
|00005a90| 72 65 74 75 72 6e 20 28 | 31 29 3b 0a 7d 0a 0a 73 |return (|1);.}..s|
|00005aa0| 74 72 75 63 74 20 61 63 | 74 5f 65 6e 74 20 2a 46 |truct ac|t_ent *F|
|00005ab0| 69 6e 64 41 63 74 69 76 | 65 20 28 63 29 0a 63 68 |indActiv|e (c).ch|
|00005ac0| 61 72 20 2a 63 3b 0a 2f | 2a 0a 20 2a 20 20 4c 6f |ar *c;./|*. * Lo|
|00005ad0| 6f 6b 20 66 6f 72 20 67 | 72 6f 75 70 27 73 20 61 |ok for g|roup's a|
|00005ae0| 63 74 69 76 65 20 65 6e | 74 72 79 20 67 69 76 65 |ctive en|try give|
|00005af0| 6e 20 67 72 6f 75 70 20 | 6e 61 6d 65 0a 20 2a 2f |n group |name. */|
|00005b00| 0a 7b 0a 09 73 74 72 75 | 63 74 20 61 63 74 5f 65 |.{..stru|ct act_e|
|00005b10| 6e 74 20 2a 61 70 3b 0a | 0a 09 61 70 20 3d 20 61 |nt *ap;.|..ap = a|
|00005b20| 63 74 5f 6c 69 73 74 3b | 0a 09 77 68 69 6c 65 20 |ct_list;|..while |
|00005b30| 28 4e 55 4c 4c 20 21 3d | 20 61 70 29 0a 09 7b 0a |(NULL !=| ap)..{.|
|00005b40| 09 09 69 66 20 28 21 73 | 74 72 63 6d 70 20 28 63 |..if (!s|trcmp (c|
|00005b50| 2c 20 61 70 2d 3e 6e 61 | 6d 65 29 29 20 72 65 74 |, ap->na|me)) ret|
|00005b60| 75 72 6e 20 28 61 70 29 | 3b 0a 09 09 61 70 20 3d |urn (ap)|;...ap =|
|00005b70| 20 61 70 2d 3e 6e 65 78 | 74 3b 0a 09 7d 0a 09 72 | ap->nex|t;..}..r|
|00005b80| 65 74 75 72 6e 20 28 4e | 55 4c 4c 29 3b 0a 7d 0a |eturn (N|ULL);.}.|
|00005b90| 0a 44 6f 47 72 6f 75 70 | 20 28 6e 70 2c 20 61 70 |.DoGroup| (np, ap|
|00005ba0| 29 0a 73 74 72 75 63 74 | 20 6e 72 63 5f 65 6e 74 |).struct| nrc_ent|
|00005bb0| 20 2a 6e 70 3b 0a 73 74 | 72 75 63 74 20 61 63 74 | *np;.st|ruct act|
|00005bc0| 5f 65 6e 74 20 2a 61 70 | 3b 0a 2f 2a 0a 20 2a 20 |_ent *ap|;./*. * |
|00005bd0| 20 50 72 6f 63 65 73 73 | 20 67 69 76 65 6e 20 67 | Process| given g|
|00005be0| 72 6f 75 70 0a 20 2a 2f | 0a 7b 0a 09 63 68 61 72 |roup. */|.{..char|
|00005bf0| 20 6e 65 77 73 5f 70 61 | 74 68 5b 50 41 54 48 5f | news_pa|th[PATH_|
|00005c00| 4c 45 4e 5d 3b 0a 09 63 | 68 61 72 20 61 72 74 5f |LEN];..c|har art_|
|00005c10| 66 69 6c 65 5b 50 41 54 | 48 5f 4c 45 4e 5d 3b 0a |file[PAT|H_LEN];.|
|00005c20| 09 69 6e 74 20 69 2c 20 | 6e 3b 0a 0a 09 70 72 69 |.int i, |n;...pri|
|00005c30| 6e 74 66 20 28 22 25 73 | 3a 20 25 73 5c 6e 22 2c |ntf ("%s|: %s\n",|
|00005c40| 20 70 72 6f 67 6e 61 6d | 65 2c 20 6e 70 2d 3e 6e | prognam|e, np->n|
|00005c50| 61 6d 65 29 3b 0a 0a 09 | 2f 2a 20 4d 61 6b 65 20 |ame);...|/* Make |
|00005c60| 61 20 6e 65 77 20 63 6f | 6e 66 65 72 65 6e 63 65 |a new co|nference|
|00005c70| 20 77 69 74 68 20 74 68 | 69 73 20 6e 61 6d 65 20 | with th|is name |
|00005c80| 2a 2f 0a 09 4e 65 77 43 | 6f 6e 66 65 72 65 6e 63 |*/..NewC|onferenc|
|00005c90| 65 20 28 6e 70 2d 3e 6e | 61 6d 65 29 3b 0a 0a 09 |e (np->n|ame);...|
|00005ca0| 2f 2a 20 43 6f 6e 73 74 | 72 75 63 74 20 70 61 74 |/* Const|ruct pat|
|00005cb0| 68 20 6e 61 6d 65 20 66 | 6f 72 20 61 72 74 69 63 |h name f|or artic|
|00005cc0| 6c 65 73 20 69 6e 20 74 | 68 69 73 20 67 72 6f 75 |les in t|his grou|
|00005cd0| 70 20 2a 2f 0a 09 73 74 | 72 63 70 79 20 28 6e 65 |p */..st|rcpy (ne|
|00005ce0| 77 73 5f 70 61 74 68 2c | 20 6e 65 77 73 5f 64 69 |ws_path,| news_di|
|00005cf0| 72 29 3b 0a 09 73 74 72 | 63 61 74 20 28 6e 65 77 |r);..str|cat (new|
|00005d00| 73 5f 70 61 74 68 2c 20 | 22 2f 22 29 3b 0a 09 73 |s_path, |"/");..s|
|00005d10| 74 72 63 61 74 20 28 6e | 65 77 73 5f 70 61 74 68 |trcat (n|ews_path|
|00005d20| 2c 20 6e 70 2d 3e 6e 61 | 6d 65 29 3b 0a 09 73 74 |, np->na|me);..st|
|00005d30| 72 63 61 74 20 28 6e 65 | 77 73 5f 70 61 74 68 2c |rcat (ne|ws_path,|
|00005d40| 20 22 2f 22 29 3b 0a 09 | 6e 20 3d 20 73 74 72 6c | "/");..|n = strl|
|00005d50| 65 6e 20 28 6e 65 77 73 | 5f 70 61 74 68 29 3b 0a |en (news|_path);.|
|00005d60| 09 66 6f 72 20 28 69 3d | 30 3b 20 69 3c 6e 3b 20 |.for (i=|0; i<n; |
|00005d70| 69 2b 2b 29 20 69 66 20 | 28 6e 65 77 73 5f 70 61 |i++) if |(news_pa|
|00005d80| 74 68 5b 69 5d 20 3d 3d | 20 27 2e 27 29 20 6e 65 |th[i] ==| '.') ne|
|00005d90| 77 73 5f 70 61 74 68 5b | 69 5d 20 3d 20 27 2f 27 |ws_path[|i] = '/'|
|00005da0| 3b 0a 0a 09 2f 2a 20 49 | 66 20 68 69 67 68 65 73 |;.../* I|f highes|
|00005db0| 74 20 72 65 61 64 20 61 | 72 74 69 63 6c 65 20 69 |t read a|rticle i|
|00005dc0| 73 20 67 72 65 61 74 65 | 72 20 74 68 61 6e 20 68 |s greate|r than h|
|00005dd0| 69 67 68 65 73 74 20 61 | 76 61 69 6c 61 62 6c 65 |ighest a|vailable|
|00005de0| 0a 09 20 20 20 61 72 74 | 69 63 6c 65 2c 20 61 73 |.. art|icle, as|
|00005df0| 73 75 6d 65 20 67 72 6f | 75 70 20 68 61 73 20 62 |sume gro|up has b|
|00005e00| 65 65 6e 20 72 65 73 65 | 74 20 2a 2f 0a 09 69 66 |een rese|t */..if|
|00005e10| 20 28 6e 70 2d 3e 68 69 | 20 3e 20 61 70 2d 3e 68 | (np->hi| > ap->h|
|00005e20| 69 29 20 6e 70 2d 3e 68 | 69 20 3d 20 61 70 2d 3e |i) np->h|i = ap->|
|00005e30| 6c 6f 3b 0a 0a 09 2f 2a | 20 4c 6f 6f 6b 20 74 68 |lo;.../*| Look th|
|00005e40| 72 6f 75 67 68 20 75 6e | 72 65 61 64 20 61 72 74 |rough un|read art|
|00005e50| 69 63 6c 65 73 20 2a 2f | 0a 09 66 6f 72 20 28 69 |icles */|..for (i|
|00005e60| 3d 6e 70 2d 3e 68 69 2b | 31 3b 20 69 3c 3d 61 70 |=np->hi+|1; i<=ap|
|00005e70| 2d 3e 68 69 3b 20 69 2b | 2b 29 0a 09 7b 0a 09 09 |->hi; i+|+)..{...|
|00005e80| 2f 2a 20 43 68 65 63 6b | 20 6d 61 78 20 62 6c 6f |/* Check| max blo|
|00005e90| 63 6b 20 63 6f 75 6e 74 | 20 2a 2f 0a 09 09 69 66 |ck count| */...if|
|00005ea0| 20 28 20 28 62 6c 6b 5f | 63 6e 74 20 3e 3d 20 6d | ( (blk_|cnt >= m|
|00005eb0| 61 78 5f 62 6c 6b 73 29 | 20 26 26 20 28 6d 61 78 |ax_blks)| && (max|
|00005ec0| 5f 62 6c 6b 73 20 3e 20 | 30 29 20 29 0a 09 09 7b |_blks > |0) )...{|
|00005ed0| 0a 09 09 09 66 63 6c 6f | 73 65 20 28 6e 64 78 5f |....fclo|se (ndx_|
|00005ee0| 66 64 29 3b 0a 09 09 09 | 6e 70 2d 3e 68 69 20 3d |fd);....|np->hi =|
|00005ef0| 20 69 3b 0a 09 09 09 72 | 65 74 75 72 6e 20 28 30 | i;....r|eturn (0|
|00005f00| 29 3b 0a 09 09 7d 0a 0a | 09 09 2f 2a 20 43 6f 6e |);...}..|../* Con|
|00005f10| 73 74 72 75 63 74 20 61 | 72 74 69 63 6c 65 27 73 |struct a|rticle's|
|00005f20| 20 66 69 6c 65 20 6e 61 | 6d 65 20 2a 2f 0a 09 09 | file na|me */...|
|00005f30| 73 70 72 69 6e 74 66 20 | 28 61 72 74 5f 66 69 6c |sprintf |(art_fil|
|00005f40| 65 2c 20 22 25 73 25 64 | 22 2c 20 6e 65 77 73 5f |e, "%s%d|", news_|
|00005f50| 70 61 74 68 2c 20 69 29 | 3b 0a 0a 09 09 2f 2a 20 |path, i)|;..../* |
|00005f60| 50 72 6f 63 65 73 73 20 | 74 68 69 73 20 61 72 74 |Process |this art|
|00005f70| 69 63 6c 65 20 2a 2f 0a | 09 09 44 6f 41 72 74 69 |icle */.|..DoArti|
|00005f80| 63 6c 65 20 28 61 72 74 | 5f 66 69 6c 65 29 3b 0a |cle (art|_file);.|
|00005f90| 09 7d 0a 09 66 63 6c 6f | 73 65 20 28 6e 64 78 5f |.}..fclo|se (ndx_|
|00005fa0| 66 64 29 3b 0a 0a 09 2f | 2a 20 52 65 73 65 74 20 |fd);.../|* Reset |
|00005fb0| 68 69 20 61 72 74 69 63 | 6c 65 20 6e 75 6d 62 65 |hi artic|le numbe|
|00005fc0| 72 20 2a 2f 0a 09 6e 70 | 2d 3e 68 69 20 3d 20 61 |r */..np|->hi = a|
|00005fd0| 70 2d 3e 68 69 3b 0a 7d | 0a 0a 44 6f 41 72 74 69 |p->hi;.}|..DoArti|
|00005fe0| 63 6c 65 20 28 61 72 74 | 5f 66 69 6c 65 29 0a 63 |cle (art|_file).c|
|00005ff0| 68 61 72 20 2a 61 72 74 | 5f 66 69 6c 65 3b 0a 7b |har *art|_file;.{|
|00006000| 0a 09 73 74 72 75 63 74 | 20 71 77 6b 5f 68 64 72 |..struct| qwk_hdr|
|00006010| 20 68 64 72 3b 0a 09 73 | 74 72 75 63 74 20 73 74 | hdr;..s|truct st|
|00006020| 61 74 20 73 74 61 74 5f | 62 75 66 3b 0a 09 6c 6f |at stat_|buf;..lo|
|00006030| 6e 67 20 74 78 74 5f 6f | 66 66 73 65 74 2c 20 65 |ng txt_o|ffset, e|
|00006040| 6e 64 5f 6f 66 66 73 65 | 74 3b 0a 09 69 6e 74 20 |nd_offse|t;..int |
|00006050| 6e 2c 20 6f 75 74 5f 62 | 79 74 65 73 3b 0a 09 63 |n, out_b|ytes;..c|
|00006060| 68 61 72 20 6e 64 78 5b | 35 5d 2c 20 2a 65 6f 66 |har ndx[|5], *eof|
|00006070| 2c 20 66 72 6f 6d 5b 50 | 41 54 48 5f 4c 45 4e 5d |, from[P|ATH_LEN]|
|00006080| 3b 0a 09 46 49 4c 45 20 | 2a 61 72 74 5f 66 64 3b |;..FILE |*art_fd;|
|00006090| 0a 0a 09 2f 2a 20 46 6f | 72 67 65 74 20 69 74 20 |.../* Fo|rget it |
|000060a0| 69 66 20 77 65 20 63 61 | 6e 27 74 20 6f 70 65 6e |if we ca|n't open|
|000060b0| 20 74 68 65 20 61 72 74 | 69 63 6c 65 20 2a 2f 0a | the art|icle */.|
|000060c0| 09 69 66 20 28 4e 55 4c | 4c 20 3d 3d 20 28 61 72 |.if (NUL|L == (ar|
|000060d0| 74 5f 66 64 20 3d 20 66 | 6f 70 65 6e 20 28 61 72 |t_fd = f|open (ar|
|000060e0| 74 5f 66 69 6c 65 2c 20 | 22 72 22 29 29 29 20 72 |t_file, |"r"))) r|
|000060f0| 65 74 75 72 6e 20 28 30 | 29 3b 0a 0a 09 2f 2a 20 |eturn (0|);.../* |
|00006100| 73 74 61 74 28 29 20 74 | 68 65 20 61 72 74 69 63 |stat() t|he artic|
|00006110| 6c 65 20 74 6f 20 67 65 | 74 20 66 69 6c 65 20 73 |le to ge|t file s|
|00006120| 69 7a 65 20 2a 2f 0a 09 | 69 66 20 28 30 20 21 3d |ize */..|if (0 !=|
|00006130| 20 73 74 61 74 20 28 61 | 72 74 5f 66 69 6c 65 2c | stat (a|rt_file,|
|00006140| 20 26 73 74 61 74 5f 62 | 75 66 29 29 0a 09 7b 0a | &stat_b|uf))..{.|
|00006150| 09 09 66 63 6c 6f 73 65 | 20 28 61 72 74 5f 66 64 |..fclose| (art_fd|
|00006160| 29 3b 0a 09 09 72 65 74 | 75 72 6e 20 28 30 29 3b |);...ret|urn (0);|
|00006170| 0a 09 7d 0a 09 65 6e 64 | 5f 6f 66 66 73 65 74 20 |..}..end|_offset |
|00006180| 3d 20 73 74 61 74 5f 62 | 75 66 2e 73 74 5f 73 69 |= stat_b|uf.st_si|
|00006190| 7a 65 3b 0a 0a 09 2f 2a | 20 53 6b 69 70 20 65 6d |ze;.../*| Skip em|
|000061a0| 70 74 79 20 61 72 74 69 | 63 6c 65 73 20 2a 2f 0a |pty arti|cles */.|
|000061b0| 09 69 66 20 28 65 6e 64 | 5f 6f 66 66 73 65 74 20 |.if (end|_offset |
|000061c0| 3d 3d 20 30 29 0a 09 7b | 0a 09 09 66 63 6c 6f 73 |== 0)..{|...fclos|
|000061d0| 65 20 28 61 72 74 5f 66 | 64 29 3b 0a 09 09 72 65 |e (art_f|d);...re|
|000061e0| 74 75 72 6e 20 28 30 29 | 3b 0a 09 7d 0a 0a 09 2f |turn (0)|;..}.../|
|000061f0| 2a 20 57 72 69 74 65 20 | 74 68 65 20 69 6e 64 65 |* Write |the inde|
|00006200| 78 20 66 69 6c 65 20 65 | 6e 74 72 79 20 2a 2f 0a |x file e|ntry */.|
|00006210| 09 69 6e 74 74 6f 6d 73 | 20 28 62 6c 6b 5f 63 6e |.inttoms| (blk_cn|
|00006220| 74 2c 20 6e 64 78 29 3b | 0a 09 6e 64 78 5b 34 5d |t, ndx);|..ndx[4]|
|00006230| 20 3d 20 63 6f 6e 66 5f | 63 6e 74 20 2d 20 31 3b | = conf_|cnt - 1;|
|00006240| 0a 09 66 77 72 69 74 65 | 20 28 6e 64 78 2c 20 35 |..fwrite| (ndx, 5|
|00006250| 2c 20 31 2c 20 6e 64 78 | 5f 66 64 29 3b 0a 0a 09 |, 1, ndx|_fd);...|
|00006260| 53 70 61 63 65 73 20 28 | 26 68 64 72 2c 20 31 32 |Spaces (|&hdr, 12|
|00006270| 38 29 3b 0a 0a 09 2f 2a | 20 46 69 6c 6c 20 69 6e |8);.../*| Fill in|
|00006280| 20 73 6f 6d 65 20 68 65 | 61 64 65 72 20 66 69 65 | some he|ader fie|
|00006290| 6c 64 73 20 2a 2f 0a 09 | 68 64 72 2e 73 74 61 74 |lds */..|hdr.stat|
|000062a0| 75 73 20 3d 20 51 57 4b | 5f 50 55 42 4c 49 43 3b |us = QWK|_PUBLIC;|
|000062b0| 0a 09 50 61 64 4e 75 6d | 20 28 6d 73 67 5f 63 6e |..PadNum| (msg_cn|
|000062c0| 74 2c 20 68 64 72 2e 6e | 75 6d 62 65 72 2c 20 37 |t, hdr.n|umber, 7|
|000062d0| 29 3b 0a 09 53 70 61 63 | 65 73 20 28 68 64 72 2e |);..Spac|es (hdr.|
|000062e0| 70 61 73 73 77 6f 72 64 | 2c 20 31 32 29 3b 0a 09 |password|, 12);..|
|000062f0| 53 70 61 63 65 73 20 28 | 68 64 72 2e 72 65 66 65 |Spaces (|hdr.refe|
|00006300| 72 2c 20 38 29 3b 0a 09 | 68 64 72 2e 66 6c 61 67 |r, 8);..|hdr.flag|
|00006310| 20 3d 20 51 57 4b 5f 41 | 43 54 5f 46 4c 41 47 3b | = QWK_A|CT_FLAG;|
|00006320| 0a 09 49 6e 74 4e 75 6d | 20 28 63 6f 6e 66 5f 63 |..IntNum| (conf_c|
|00006330| 6e 74 2d 31 2c 20 68 64 | 72 2e 63 6f 6e 66 65 72 |nt-1, hd|r.confer|
|00006340| 65 6e 63 65 29 3b 0a 09 | 49 6e 74 4e 75 6d 20 28 |ence);..|IntNum (|
|00006350| 6d 73 67 5f 63 6e 74 2b | 31 2c 20 68 64 72 2e 6d |msg_cnt+|1, hdr.m|
|00006360| 73 67 5f 6e 75 6d 29 3b | 0a 09 68 64 72 2e 74 61 |sg_num);|..hdr.ta|
|00006370| 67 20 3d 20 27 20 27 3b | 0a 09 50 61 64 53 74 72 |g = ' ';|..PadStr|
|00006380| 69 6e 67 20 28 22 41 4c | 4c 22 2c 20 68 64 72 2e |ing ("AL|L", hdr.|
|00006390| 74 6f 2c 20 32 35 29 3b | 0a 0a 09 6d 73 67 5f 63 |to, 25);|...msg_c|
|000063a0| 6e 74 2b 2b 3b 0a 0a 09 | 2f 2a 20 50 72 6f 63 65 |nt++;...|/* Proce|
|000063b0| 73 73 20 68 65 61 64 65 | 72 20 6c 69 6e 65 73 20 |ss heade|r lines |
|000063c0| 2a 2f 0a 09 65 6f 66 20 | 3d 20 46 67 65 74 73 20 |*/..eof |= Fgets |
|000063d0| 28 62 75 66 2c 20 42 55 | 46 5f 4c 45 4e 2c 20 61 |(buf, BU|F_LEN, a|
|000063e0| 72 74 5f 66 64 29 3b 0a | 09 77 68 69 6c 65 20 28 |rt_fd);.|.while (|
|000063f0| 20 28 30 20 21 3d 20 73 | 74 72 6c 65 6e 28 62 75 | (0 != s|trlen(bu|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.